Configuration reference
Two files. Every key is checked at start: a wrong value prints one red console line naming the key, and the default below is used.
Two files. Every key is checked at start: a wrong value prints one red console line naming the key, and the default below is used.
config.luais public: every player can read it. Nothing secret goes here.server/config.luais server only: the kit, the money, licences, the webhook.
config.lua
| Key | Type | Default | Effect |
|---|---|---|---|
Config.Debug | boolean | false | Extra console lines (each opened kit). |
Config.Brand | string | 'the city' | Your server's name in the notice title, "Welcome to {brand}". |
Config.Items.pack | item name | 'welcome_pack' | The sealed pack item. Lowercase, no spaces. Must exist in your inventory. |
Config.Notice.enabled | boolean | true | Show the "a pack is waiting" notice. |
Config.Notice.delayMs | 0-120000 | 8000 | Delay after the hand-out, so a loading screen has faded. |
Config.Notice.durationMs | 1000-60000 | 12000 | How long the notice stays. |
server/config.lua
Features
| Key | Default | Effect |
|---|---|---|
Features.handout | true | Hand the pack out automatically when a character loads. Off = only /welcomekit give or the givePack export. |
Features.sweepOnStart | true | On a resource start, offer a pack to every player online (only those without a claim get one). |
Features.stampOwner | true | Stamp the pack with the character id; only that character can open it. Needs item metadata. |
Features.adminCommand | true | Register the staff command. |
Who gets a kit
| Key | Type | Default | Effect |
|---|---|---|---|
ClaimPer | 'license' | 'character' | 'license' | One kit per Rockstar licence (a deleted and remade character gets nothing), or one per character. |
RequireStamp | boolean | true | Refuse packs with no owner stamp. Set false when upgrading a server that still holds pre-2.1.1 packs. Ignored on inventories without metadata. |
Handout.loadDelayMs | 0-60000 | 5000 | Wait after the character loads before adding the pack (lets the inventory load). |
Handout.sweepDelayMs | 0-120000 | 8000 | Wait after a resource start before the sweep. |
The kit
| Key | Type | Default | Effect |
|---|---|---|---|
Kit | { { 'item', count }, ... } or nil | nil | What opening the pack gives. nil = the preset's kit. Count 1-1000. Bad lines are skipped with a red line; an item your inventory does not know is named at start (the pack cannot open until it exists). |
Preset | string | 'auto' | Which presets/*.lua fills Kit when it is nil. 'auto' = ox when ox_inventory runs, qb on QBCore/Qbox, esx on ESX. |
The swap is all-or-nothing: if the kit does not fit, nothing is taken, the pack stays, and the player is told to make room and open it again.
Starting money
| Key | Type | Default | Effect |
|---|---|---|---|
Money.account | 'bank' | 'cash' | 'bank' | Where it goes. |
Money.amount | 0-10000000 | 5000 | Paid once per claim, when the kit is opened. 0 turns it off. The payment reason is cc_welcome:kit. |
Licences from other resources
Licences is a list. Each entry is called once, when the kit is opened:
ServerConfig.Licences = {
{ resource = 'cc_fishing', export = 'grantLicence', label = 'Fishing licence', already = { 'already' } },
}| Field | Effect |
|---|---|
resource | The resource name. Skipped silently when it is not started. |
export | Its server export, called as exports[resource][export](source, 'cc_welcome kit'). Must return true, or false, code. |
label | Shown to the player: "Fishing licence added." |
already | Codes that mean "they already have it": not an error, no notice. |
A licence that fails is told to the player and logged; it never blocks the kit.
Staff and logging
| Key | Default | Effect |
|---|---|---|
Command | 'welcomekit' | The staff command name. |
AdminAce | 'cc_welcome.admin' | The ACE it needs. add_ace group.admin cc_welcome.admin allow. |
Webhook | convar cc_welcome_webhook | Discord channel for hand-outs, opens, refusals, resets and failed payments. Empty = console only. Set it with set, never setr. |
Presets
A preset is a file in presets/ that adds one table:
WelcomePresets = WelcomePresets or {}
WelcomePresets.myserver = {
kit = { { 'water', 2 }, { 'phone', 1 } },
overrides = { -- optional: replaces these ServerConfig keys
Money = { account = 'cash', amount = 2500 },
Licences = { },
},
}Then ServerConfig.Preset = 'myserver'. The kit is used only when ServerConfig.Kit is nil; overrides always apply. Presets are loaded on the server only.
Locales
setr cc_welcome_locale "de" (en, de, es, fr, pt ship). To add a language, copy locales/en.json to locales/.json, translate the values, keep every {name} placeholder. A missing key falls back to English.
How the protection works
- The claim row is written before the pack is given, by a statement only one caller can win; if the pack cannot be carried the row is removed so the next load retries.
- Opening checks the owner stamp (when the inventory has metadata), then marks the claim opened (once). If the swap then fails, the open is given back.
- So: one pack per claim, one open per claim, one payment per claim. A traded pack does not open for anyone else; a second pack (however obtained) does not open on a claim already opened.