Skip to content
This page was translated from German using AI. If anything is unclear, the German version applies.

HM Adventskalender - Configuration

All settings live in config.lua. Most of them are starting values: doors, wheels, switches and appearance are easier to change in the tablet under Management – that is saved in data/*.json and takes precedence.

SettingDefaultMeaning
Config.Locale'de'Language: 'de' or 'en'
Config.Command'adventskalender'Command to open the calendar
Config.Aliases{ 'advent' }further commands that work the same
Config.OpenKeynilKey to open, e.g. 'F7' (every player can change it in the GTA settings); nil = none
Config.OnlyAtNpcfalsetrue = calendar can only be opened at Santa (the command then only works for admins)
Config.Identity'license''license' = one calendar per player account (recommended), 'character' = one per character
Config.Layout'shuffle''shuffle' = doors mixed up (same every year), 'ordered' = 1 to 24
Config.ShowOddstrueplayers see the odds of the wheels
Config.Soundstruesoft clicking while the wheel spins
Config.Announcetrueshow big wins (prizes with announce = true) to all players
Config.SpinSeconds7how long the wheel spins; the prize arrives once it stops
SettingDefaultMeaning
Config.TimeZone'Europe/Berlin'Time zone with daylight saving time (also Vienna, Zurich, Amsterdam, Paris, Brussels, London); a number = fixed hours from UTC; 'server' = clock of the server machine
Config.Month12month of the calendar
Config.Days24number of doors (24 = up to Christmas Eve, max. 31)
Config.OpenHour0hour from which the day’s door opens (e.g. 18 = only in the evening)
Config.ShowUntil{ month = 1, day = 6 }the review stays visible until then, after that it pauses until next December
Config.CatchUpDays0catch up missed doors: 0 = only today’s, 2 = up to two days back, 24 = all

All of this can also be changed in the tablet under Management → Settings → Appearance.

SettingDefaultMeaning
BrandName'HypeModding'server name top left and on the calendar
Title'Adventskalender'title on the calendar
Subtitle''empty = “server name · year”
LogoUrl''your own logo top left (https://… or nui://…)
Print'markt'print image: 'markt' (Christmas market), 'dorf' (winter village), 'flach' (simple), 'eigen' (own image)
PrintUrl''your own image in 16:9, e.g. 2560×1440
Accent'#b3262b'color for today’s door, buttons and numbers
NumberStyle'kreis''kreis' (circle), 'gold' or 'schlicht' (simple)
ShowTitletrueprint the title on the calendar
Papertruesubtle paper texture on picture and doors

Only admins see the management (gear icon top right), and the server checks every action itself as well. One of these rules is enough:

Config.Permissions = {
Ace = 'hm_advent.admin', -- server.cfg: add_ace group.admin hm_advent.admin allow
Groups = { 'admin', 'superadmin' }, -- ESX group or QBCore/Qbox permission
Identifiers = {}, -- single players, e.g. 'license:…'
}

ACE only? Set Groups = {}. Custom rules can be added in open/server.lua in the function Open.IsAdmin.

SettingDefaultMeaning
Enabledtrueshow Santa at the calendar
Model'hm_santa'ped model (resource hm_santa must be running)
FallbackModel'a_m_m_bevhills_02'used if the model can’t be loaded
CoordsLegion Squarestarting location; can be set in the tablet with To my position
Scenario'WORLD_HUMAN_STAND_IMPATIENT_UPRIGHT'Santa’s animation
Distance2.2range for E / ox_target
Bliponmap blip (sprite, color, size, name)

Vehicles won end up in the player’s garage. With hm_garage this uses its export, otherwise the framework’s vehicle table directly (owned_vehicles or player_vehicles, on Qbox via qbx_vehicles).

SettingDefaultMeaning
Garagenilhm_garage garage (nil = first public car garage)
PlatePrefix'XMAS'plate = prefix + digits (max. 8 characters)
EsxParkingnilESX: value for owned_vehicles.parking
QbGarage'pillboxgarage'QBCore: garage in player_vehicles.garage
GarageNameniljg-advancedgarages / cd_garage: garage ID
ExtraColumns{}extra columns for your garage script, e.g. { in_garage = 1 } (only if they exist)

Config.ItemImages = 'auto' detects ox_inventory, qb-inventory and ps-inventory. For other inventories enter the path, e.g. 'nui://my_inventory/html/images/%s.png'.

The easiest way to set the content is the tablet. config.lua holds the starting values:

Config.Doors = {
[1] = { rewards = { { type = 'item', name = 'bread', count = 3 } } },
[6] = { wheel = 'advent', title = 'Nikolaus' },
}

A door has either fixed rewards (rewards, all are handed out together) or a wheel (wheel). title is shown on the door.

TypeFieldsExample
itemname, count{ type = 'item', name = 'bread', count = 3 }
moneyaccount ('money', 'bank', 'black_money'), amount{ type = 'money', account = 'bank', amount = 5000 }
weaponname, ammo{ type = 'weapon', name = 'WEAPON_SNOWBALL', ammo = 10 }
vehiclemodel, label{ type = 'vehicle', model = 'sultan', label = 'Karin Sultan' }
customlabel, event, data, icon{ type = 'custom', label = '7 days VIP', event = 'myserver:vip', data = '7' }

For all types, label overrides the displayed name.

Wheels: weight = weighting (chance = weight ÷ sum of all weights), limit = how often the prize may be won in the whole year (after that it disappears from the wheel), announce = true = all players see the win, plus color and icon (Font Awesome 6 name, e.g. 'car-side'; a dropdown in the tablet).

The custom type triggers TriggerEvent(event, source, data, label) on the server. This way you can hand out anything your server knows – VIP time, coins, licenses. If you need something else, adjust Open.GiveCustom in open/server.lua. After every delivery Open.OnClaim is called as well, e.g. for your own logs or Discord.