Skip to content

Install

Put the cc_welcome folder anywhere under resources. Do not rename it: the inventory export is cc_welcome.usePack.

1. Requirements

  • cc_lib 1.11.0 or newer, started before cc_welcome.
  • oxmysql, started before cc_welcome.
  • Your framework and inventory, started before cc_welcome.

2. The resource

Put the cc_welcome folder anywhere under resources. Do not rename it: the inventory export is cc_welcome.usePack.

3. The pack item

Pick the file for your inventory from install/items/ and paste the entry into your items list. Copy install/images/welcome_pack.png into your inventory's image folder.

InventoryFilePaste intoImage folder
ox_inventory (also Qbox, ox_core, ESX + ox)ox_inventory.luaox_inventory/data/items.luaox_inventory/web/images/
qb-inventory, ps-inventory, lj-inventoryqb-inventory.luaqb-core/shared/items.lua<inventory>/html/images/
qs-inventoryqs-inventory.luaqs-inventory/shared/items.luaqs-inventory/html/images/
ESX built-in inventoryesx.sqlrun in your databaseyour inventory UI's images

On ox_inventory keep consume = 0 and server = { export = 'cc_welcome.usePack' }: cc_welcome takes the pack itself, as part of one all-or-nothing swap.

Paste only the entry inside the return { ... } wrapper; the wrapper is there so the file is valid Lua.

4. server.cfg

cfg
ensure cc_lib
ensure oxmysql
# your framework and inventory here
ensure cc_welcome

add_ace group.admin cc_welcome.admin allow

# optional
setr cc_welcome_locale "en"                         # en, de, es, fr, pt
set  cc_welcome_webhook "<your Discord webhook URL>"   # set, never setr

install/convars.cfg has the same lines to copy.

5. Choose the kit

Open server/config.lua. Leave ServerConfig.Kit = nil to use the preset for your inventory, or list your own items. Set ServerConfig.Money. See CONFIG.

6. Start and check

Restart the server (or ensure cc_welcome). The console prints:

[cc_welcome] cc_welcome 3.0.0 | framework: qbox | preset: ox | kit lines: 5 | per: license | database: ready

Red lines above it name any config problem. Load a character: the pack arrives after ServerConfig.Handout.loadDelayMs (5 s), the notice after Config.Notice.delayMs (8 s). Use it from the inventory.

Upgrading from 2.x

  • Replace the folder. Keep your old server/config.lua aside and copy your kit into the new one.
  • The table gains an opened_at column on first start, by itself.
  • ServerConfig.Licences.fishing = true becomes an entry in the new ServerConfig.Licences list (an example for cc_fishing is in the file).
  • Packs handed out before 2.1.1 carry no owner stamp. If players still hold some, set ServerConfig.RequireStamp = false so they open (still once per claim).
  • The 2.1.1 table that recorded opens of unstamped packs is no longer used. It is left alone; drop it if you like.