Installing cc_supply
Put the cc_supply folder in your resources (any category folder is fine). Do not rename it: the events and exports are named cc_supply.
1. Files
Put the cc_supply folder in your resources (any category folder is fine). Do not rename it: the events and exports are named cc_supply.
2. Start order (server.cfg)
cc_supply starts after everything it talks to:
ensure oxmysql
ensure cc_lib
# your framework (es_extended / qb-core / qbx_core / ox_core), inventory and target
# optional, if you run them: cc_business, cc_freight, lb-phone, cc_fishing, tcc-exchange
ensure cc_supplyOptional resources are detected at runtime, so starting one later still works.
3. Permission
add_ace group.admin cc_supply.admin allowAdmin is an ACE, never a job. Give it to whichever group runs your economy.
4. Items
Every item in ServerConfig.Lines must exist in your inventory, plus supply_crate if you keep hijacks on. Ready-made definitions:
| Inventory | File |
|---|---|
| ox_inventory (also Qbox, ESX + ox) | install/items/ox_inventory.lua |
| qb-inventory / QBCore shared items | install/items/qb-inventory.lua |
| ESX default inventory | install/items/esx.sql |
Skip the ones you already have (most servers already have steel, copper, plastic, ...). Fish must not stack (each fish carries its weight in its metadata).
5. Database
Nothing to do: the resource creates its 10 cc_supply_* tables at boot. If your database user may not CREATE, run sql/install.sql once by hand. Every statement is IF NOT EXISTS; it is safe to run twice and never drops anything.
6. Webhooks (optional)
In your secrets file, with set (never setr, which sends the value to every client):
set cc_supply_webhook "https://discord.com/api/webhooks/..."
set cc_supply_webhook_economy "https://discord.com/api/webhooks/..."
set cc_supply_webhook_admin "https://discord.com/api/webhooks/..."
set cc_supply_webhook_security "https://discord.com/api/webhooks/..."7. Businesses (optional)
- With cc_business: nothing to do. Staff with the
order_suppliespermission use the business desk; deliveries go to the business's delivery bay and stash. - Without it: list your business jobs in
ServerConfig.Business.jobs:luajobs = { mechanic = { label = 'Mechanic Shop', minGrade = 2, stash = 'mechanic_stock', bay = vec3(-356.0, -134.0, 39.0) }, },The job's society account pays for orders (ESX
esx_society, QBCore/Qbox management, Renewed-Banking and the otherscc_libbridges). With astashon ox_inventory or qb-inventory, NPC freight drops finished orders straight into it; otherwise staff collect them at the depot bay. Abaylets couriers deliver to the business.
8. Couriers, hijacks and the back door (optional)
Delivery contracts need a courier script that calls the contract exports (cc_freight does; add your own to ServerConfig.Contracts.trusted). Hijacks only happen to a loaded courier vehicle, and the back door only buys hijacked crates, so without a courier script both stay quiet. Turn them off outright with Config.Features.hijack = false / grey = false.
9. Check it works
Console on start:
[cc_supply] business backend: job
[cc_supply] cc_supply 2.0.0 | 3 of 3 depots surveyed | 44 lines | 0 orders, 0 contracts in flight | readyIn game: go to the "Port Wholesale" blip on Elysian Island, target the clerk, sell an item from the board. /supplyadmin status shows stock and orders.
Updating
Back up config.lua, server/config.lua, custom/ and locales/, replace the folder, put your files back, read CHANGELOG.md in the resource folder for renamed keys. The database upgrades itself.