Advent Calendar: installation and configuration (ESX)

Install the Advent Calendar v1.2 on an ESX FiveM server: database, rewards for the 24 doors, NPC, Discord logs and test mode.

The Advent Calendar features 24 animated doors that open in 3D (snow, garland, confetti and sounds), a golden door 24 for the grand finale, a progress bar and a countdown to the next door. All checks are performed server-side: a gift can never be claimed twice.

Requirements

  • ESX Legacy
  • oxmysql
  • Optional: ox_inventory and ox_target

1. Get the product

After purchase, the product is automatically delivered to the Cfx.re account used during payment. Open the Cfx.re portal (Granted Assets), find the product and download the archive.

The product is protected by Cfx.re escrow: it only works on a server whose license key (sv_licenseKey) belongs to the same Cfx.re account that received the asset.

2. Install

  1. Place the script folder in resources.
  2. Import the provided .sql file into your database (the table is also created automatically on first start).
  3. Add ensure followed by the folder name in server.cfg, after es_extended and oxmysql (and after ox_inventory / ox_target if you use them).
  4. Restart the server.

3. Configure

Everything is set in config.lua:

  • the rewards of each door (clean money, bank, dirty money, items, weapons, as many as you want per door) as well as their title, color and icon;
  • the catch-up of missed days (enabled or not) and the server's time zone;
  • the location of the NPC and its blip (E key or ox_target);
  • the Discord webhook for logs (Channel settings › Integrations › Webhooks › Copy URL) and the automatic kick of suspicious attempts, optional;
  • the language: French and English included.

Players open the calendar with /calendrier or by going to the NPC, and receive a reminder on login when gifts are waiting for them.

4. Test before December

Enable the test mode to try the calendar outside the season. Admins also have a command to reset a player or a door. Developers can hook their scripts in using the exports and the event provided (see the documentation).

5. Troubleshooting

  • SQL error: make sure oxmysql starts before the script and that the table exists.
  • Item not received: the script checks inventory space before giving the gift; check the item name in config.lua.
  • No Discord logs: check the webhook URL in config.lua.
Need help? Open a ticket from your support area: specify the product and your framework, and attach a screenshot or the console log (F8).