How to Set Up the SleepyCode Advent Calendar on FiveM
Setup guide for SC Advent Calendar - FiveM seasonal reward script with 24 daily gifts. Dependencies, config.lua reward types and Discord webhook.
SC Advent Calendar is a seasonal FiveM script that gives players a different reward every day for 24 days. Server owners configure the gift for each day - choosing between vehicles, inventory items, and money - and set which day is currently active. The script logs every gift claim to a Discord webhook.
> Framework: No specific framework required. The script works on any FiveM server. It requires ox_lib and oxmysql regardless of your framework.
Dependencies
| Resource | Where to get it |
|---|---|
| ox_lib | github.com/overextended/ox_lib |
| oxmysql | github.com/overextended/oxmysql |
Installation Steps
1. Place the resource
Extract the downloaded folder from Keymaster and place it inside your server's resources directory.
2. Add to server.cfg
ensure ox_lib
ensure oxmysql
ensure sc_advent_calendarOptionally, set your server locale for ox_lib before starting resources:
setr ox:locale enReplace en with your language code (e.g. pl for Polish) if you have a translation file in locales/.
3. No manual SQL needed
The script automatically creates its database tables on the first launch. You do not need to import any .sql file.
4. Configure rewards
Open shared/config.lua and set up the 24 gifts and the currently active day. See below for config details.
5. Restart and test
Restart the server. Players can open the advent calendar in-game and claim today's gift (the day set in Config.Day).
Setting the Active Day
Config.Day = 5 -- which calendar day is currently openUpdate this value each day to advance the calendar. Only the day matching Config.Day will be claimable; all other days are locked or shown as already claimed.
Configuring Gifts
Each of the 24 days is configured inside the Config.Gifts table:
Config.Gifts = {
[1] = { type = "money", name = "money", amount = 5000, label = "$5,000" },
[2] = { type = "item", name = "sandwich", amount = 3, label = "3x Sandwich" },
[3] = { type = "car", name = "adder", amount = 1, label = "Adder" },
-- ... entries 4–24
}Reward Types
There are three reward types:
| Type | `name` field | `amount` field |
|---|---|---|
| `money` | `"money"` | cash amount (integer) |
| `item` | inventory item name (e.g. `"sandwich"`) | quantity |
| `car` | vehicle spawn name (e.g. `"adder"`) | always `1` |
Make sure the name value for item rewards exactly matches the item registered in your inventory resource, and that the name for car rewards is a valid GTA V vehicle spawn name.
Discord Webhook
Open shared/config.server.lua and add your Discord webhook URL:
ConfigServer.Webhook = "https://discord.com/api/webhooks/YOUR_WEBHOOK_HERE"Leave it empty ("") to disable Discord logging.
The webhook message includes the player name, reward type, reward name, and amount:
ConfigServer.Locales = {
Title = "Gracz odebrał prezent z Kalendarza Adwentowego!",
Description = "Gracz {name} odebrał prezent: {reward} x{amount}",
Color = 2552550,
}You can translate these strings to English or any other language by editing the values directly.
Translations
If you want to translate the in-game UI, duplicate one of the files in the locales/ folder (e.g. pl.json) and rename it to your language code. Then set setr ox:locale yourcode in server.cfg.
Common Issues
Players claim the wrong day's gift - Double-check that Config.Day is set to the correct number and the resource has been restarted or reloaded after the change.
Car reward gives nothing - The name field must be a valid GTA V vehicle model name (not a display name). Test with /givecar [id] [model] car if available on your server.
Item reward gives nothing - Confirm the item name in Config.Gifts matches the item in your ox_inventory or ESX inventory exactly (case-sensitive).
Discord webhook not sending - Verify the webhook URL is correct and the bot has permission to post in that channel.
Support
Join the SleepyCode Discord at discord.gg/qCDt8u7Efgdiscord.gg/qCDt8u7Efghttps://discord.gg/qCDt8u7Efg for help. Purchase the Advent Calendar script at sleepycode.eu/scriptssleepycode.eu/scripts/scripts.