Skip to content

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.lua is public: every player can read it. Nothing secret goes here.
  • server/config.lua is server only: the kit, the money, licences, the webhook.

config.lua

KeyTypeDefaultEffect
Config.DebugbooleanfalseExtra console lines (each opened kit).
Config.Brandstring'the city'Your server's name in the notice title, "Welcome to {brand}".
Config.Items.packitem name'welcome_pack'The sealed pack item. Lowercase, no spaces. Must exist in your inventory.
Config.Notice.enabledbooleantrueShow the "a pack is waiting" notice.
Config.Notice.delayMs0-1200008000Delay after the hand-out, so a loading screen has faded.
Config.Notice.durationMs1000-6000012000How long the notice stays.

server/config.lua

Features

KeyDefaultEffect
Features.handouttrueHand the pack out automatically when a character loads. Off = only /welcomekit give or the givePack export.
Features.sweepOnStarttrueOn a resource start, offer a pack to every player online (only those without a claim get one).
Features.stampOwnertrueStamp the pack with the character id; only that character can open it. Needs item metadata.
Features.adminCommandtrueRegister the staff command.

Who gets a kit

KeyTypeDefaultEffect
ClaimPer'license' | 'character''license'One kit per Rockstar licence (a deleted and remade character gets nothing), or one per character.
RequireStampbooleantrueRefuse 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.loadDelayMs0-600005000Wait after the character loads before adding the pack (lets the inventory load).
Handout.sweepDelayMs0-1200008000Wait after a resource start before the sweep.

The kit

KeyTypeDefaultEffect
Kit{ { 'item', count }, ... } or nilnilWhat 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).
Presetstring'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

KeyTypeDefaultEffect
Money.account'bank' | 'cash''bank'Where it goes.
Money.amount0-100000005000Paid 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:

lua
ServerConfig.Licences = {
    { resource = 'cc_fishing', export = 'grantLicence', label = 'Fishing licence', already = { 'already' } },
}
FieldEffect
resourceThe resource name. Skipped silently when it is not started.
exportIts server export, called as exports[resource][export](source, 'cc_welcome kit'). Must return true, or false, code.
labelShown to the player: "Fishing licence added."
alreadyCodes 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

KeyDefaultEffect
Command'welcomekit'The staff command name.
AdminAce'cc_welcome.admin'The ACE it needs. add_ace group.admin cc_welcome.admin allow.
Webhookconvar cc_welcome_webhookDiscord 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:

lua
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.