Configuration
Every config.lua option in Frozen Christmas Lottery: framework, inventory, target, notify, storage, item images, commands, admins and exports.
On this page
config.lua only tells the script what your server runs. Lotteries, prizes, prices, the advent calendar, the draw, kiosks and texts are not in this file: they're set in game with /xmasadmin and saved in your database.
Every option is on auto by default, which works on almost every server. Change one only when the script picks the wrong resource. Restart the script after a change.
Options
Config.Framework
Config.Framework = 'auto'| Value | Framework |
|---|---|
'auto' | Detected on start (default) |
'esx' | ESX Legacy and old ESX |
'qb' | QBCore |
'qbx' | Qbox |
'vrp' | vRP 0.5 (Dunko) and vRPex |
'ox' | ox_core |
'nd' | ND_Core |
'standalone' | No framework (needs ox_inventory for money and items) |
Config.Inventory
Config.Inventory = 'auto''auto' uses ox_inventory when it's running, otherwise your framework's own inventory. Set 'ox' or 'framework' to choose. Inventories that hook into the ESX or QB item functions (qs, ps, lj, codem, core and others) work through 'framework'.
Config.Target
Config.Target = 'auto'How players open a kiosk. 'auto' uses ox_target, then qb-target, then a "press E" prompt. Set 'ox_target', 'qb-target' or 'none' (always press E).
Config.Notify
Config.Notify = 'auto'Which notifications are used. 'auto' uses ox_lib, then your framework, then GTA's own. Set 'ox_lib', 'esx', 'qb' or 'gta'.
Config.Storage
Config.Storage = 'auto'Where everything is saved. 'auto' uses oxmysql when it's running, otherwise the server's own KVP storage (no database needed). Set 'oxmysql' or 'kvp' to choose.
With oxmysql, two tables are created on first start: frozen_xmaslottery (all settings and data) and frozen_xmaslottery_log (the log).
Config.ItemImages
Config.ItemImages = 'auto'Where item pictures for prizes come from. 'auto' finds the image folder of ox_inventory, qs-inventory, ps-inventory, lj-inventory, codem-inventory, core_inventory, qb-inventory or esx_inventoryhud. For any other inventory, set the path yourself; %s is the item name:
Config.ItemImages = 'nui://my_inventory/html/images/%s.png'Commands
Config.AdminCommand = 'xmasadmin'
Config.PlayerCommand = 'xmaslottery'The names of the admin command and the player command. /xmaslottery only works for players when Open from anywhere is on in Settings.
Admins
Config.AdminAce = 'frozenlottery.admin'
Config.AdminGroups = { 'god', 'superadmin', 'admin' }A player is an admin when they have the ace permission, or their framework group is in Config.AdminGroups. To use the ace permission, add this to server.cfg:
add_ace group.admin frozenlottery.admin allowExports
For other scripts and inventories:
-- ox_inventory item export (already set in the item code from Installation)
exports.frozen_xmaslottery:useTicket(event, item, inventory, slot, data)
-- Opens the lottery that uses this ticket item for a player, and uses up one ticket.
-- Call it from any inventory's use-item code.
exports.frozen_xmaslottery:UseTicket(source, itemName)UseTicket does the same as using the item: it checks the lottery is open and the player has the item, takes one, and starts the game.
Still stuck?Ask on our Discord