Skip to content
Documentation
Games & Events4Christmas Season

r_christmas Installation

Install r_christmas: download it from the Cfx.re Portal, add the candy cane item and ensure it after ox_lib, oxmysql and ESX, QBCore or QBX.

Prerequisites

  • ox_lib
  • oxmysql
  • ESX, QBCore or QBX
  • Optional: ox_inventory or qs-inventory, ox_target or qb-target, trase_discord or Badger_Discord_API (leaderboard pictures), R_Props Christmas (its trees, presents and snowman show up on their own)

Installation Steps

Download & Extract

  1. Download R_Christmas from your Cfx.re Portal
  2. Extract the folder into your server's resources directory
  3. Make sure the folder is named exactly r_christmas
  • r_christmas
    • assetscandy cane item for ox_inventory, QBCore and ESX, and images
      • bridgeopen: prompt, progress bar and custom target
        • cl_progress.luaR.Progress = 'custom'
        • cl_target.luaR.Target = 'custom'
        • cl_textui.luaR.TextUI = 'custom'
      • client
        • cl_custom.luanotify, weather, keys, fuel
      • localesen, fi
        • server
          • sv_custom.luaDiscord webhooks
        • shared
          • config.luaseason, hub, calendar, shop
          • config_events.luaworld events, gifts, New Year
          • config_hunts.luasnowmen, presents, Yeti hunt
        • sqlonly if you import it yourself
          • webthe built UI, no need to touch
            • fxmanifest.lua

          Add the candy cane item

          Candy canes are a normal item called r_candycane. Add it to your inventory and copy assets/images/r_candycane.png into its image folder.

          In ox_inventory/data/items.lua (also in assets/ox_inventory_items.lua):

          ['r_candycane'] = {
              label = 'Candy Cane',
              weight = 10,
              stack = true,
              close = true,
              description = 'Christmas candy cane. Spend it in the Christmas hub shop.'
          },

          Copy the image into ox_inventory/web/images/.

          The shop also sells the Snowball Launcher. If your inventory has no picture for it, copy assets/images/WEAPON_SNOWLAUNCHER.png too.

          Add to server.cfg

          Put it after ox_lib, oxmysql, your framework, inventory and target:

          ensure ox_lib
          ensure oxmysql
          ensure qbx_core
          ensure ox_inventory
          ensure ox_target
          ensure r_props_christmas
          ensure r_christmas

          Admins (R.AdminGroup) can use /xmasadmin. To give it to another group:

          add_ace group.admin command.xmasadmin allow

          Language (optional, default English):

          setr ox:locale "en"   # en | fi

          Discord logs (optional)

          Paste your webhooks into Webhooks at the top of server/sv_custom.lua (season, shop, events, gifts, admin). Empty ones are skipped.

          Restart & connect

          Restart your server, or start the script from the server console. The tables are created on first start.

          Server console
          refresh
          ensure r_christmas
          Started resource r_christmas
          [r_christmas] created table r_christmas_players
          [r_christmas] created table r_christmas_gifts
          [r_christmas] created table r_christmas_santa

          The season runs from 1 December to 6 January (server date). To try it before then:

          /xmasadmin season on
          /xmasadmin day 12

          Then go to the tree at Legion Square (map blip Christmas Square) and press E, or type /christmas. /xmasadmin season auto and /xmasadmin day (without a number) undo the test settings. Both stay saved across restarts until you do.

          Admin commands

          All under /xmasadmin (R.Commands.admin), also from the server console:

          CommandWhat it does
          season on | off | autoForces the season on or off, or back to the dates
          day <1-31>Pretends it is that day of December, no number clears it
          canes <id> <amount>Gives a player candy canes
          cheer <id> <amount>Gives a player cheer
          sleighStarts a sleigh drop now
          haulerSends out the Holiday Hauler now
          yetiStarts a Yeti rampage now
          thief <id>Sends the Yule Thief after a player
          fireworksRuns the New Year fireworks now
          santaDraws the Secret Santa pairs now

          Updates

          The console tells you when a new version is out. Download it from the Cfx.re Portal and replace the folder, keeping your shared/ configs, bridge/, client/cl_custom.lua, server/sv_custom.lua and locales.

          Keep the folder name r_christmas and don't change author in fxmanifest.lua, or the update check stops.

          Next Steps