Installing cc_tradie
Five minutes on any server. Nothing to run by hand in your database.
Five minutes on any server. Nothing to run by hand in your database.
1. Requirements
| Version | Why | |
|---|---|---|
| cc_lib | 1.7.0 or newer (1.13.0+ for the pay/XP boost) | the bridge to your framework, inventory, target, keys, fuel and notify. Free with every Code Cartel script |
| oxmysql | any current release | worker profiles and the cargo audit |
| FXServer | a current recommended build, OneSync on | Lua 5.4 (lua54 'yes') and server-side vehicles |
Everything else is optional and detected at start: see COMPATIBILITY.md.
2. Files
- Unzip
cc_tradieinto your resources folder (for exampleresources/[jobs]/cc_tradie). Keep the folder namecc_tradie: escrow binds the files to it. - Make sure
cc_libandoxmysqlare in your resources too.
3. Items
cc_tradie gives and takes items only by the names in server/config.lua → ServerConfig.Items. Add the ones your inventory does not have yet:
| Inventory | File | Where it goes |
|---|---|---|
| ox_inventory | install/items/ox_inventory.lua | paste into ox_inventory/data/items.lua |
| qb-inventory / ps / lj (QBCore, Qbox with qb items) | install/items/qb-inventory.lua | paste into qb-core/shared/items.lua |
| ESX (default inventory) | install/items/esx.sql | run once in your database |
| any other | — | create items with the names in ServerConfig.Items, or rename the values there to items you already have |
Copy install/images/*.png into your inventory's image folder (ox_inventory/web/images/, qb-inventory/html/images/, ...).
The materials (metalscrap, steel, copper, aluminum, iron, rubber, glass) are common names many servers already have. Skip any you already have. If yours are called something else, change the value in ServerConfig.Items (steel = 'my_steel'): the code only ever uses the key on the left.
At start the console lists every item name your inventory does not know.
4. server.cfg
Paste install/convars.cfg after cc_lib and oxmysql:
ensure oxmysql
ensure cc_lib
ensure cc_tradie
# staff recovery panel and staff commands
add_ace group.admin cc_tradie.admin allow
# optional: load presets/<name>.lua over server/config.lua
# setr cc_tradie:preset "default"Order matters: cc_lib and oxmysql must start before cc_tradie.
5. First start
Restart the server (or ensure cc_tradie). The tables create themselves (cc_tradie_profiles, cc_tradie_runs, cc_tradie_meta); sql/ is there to read, not to run. The console prints one line:
cc_tradie 1.3.0 started (13 sites, preset default, 0 config warning(s))Any number other than 0 config warning(s) is listed in the lines above it, each naming the key to fix. See TROUBLESHOOTING.md.
6. Try it
- Go to the Tradie Depot blip (Route 68, Grand Senora Desert).
- Talk to the foreman (target, or
[E]without a target resource), open the board. - Buy a jackhammer in the tool shop (
$7,500by default). - Clock on, pick a contract, take the truck, drive to the site.
- Inside the site press E, hold LMB to keep the needle in the green band.
- Drive back, park in the depot return zone, unload the tool chest.
7. Make it yours
- Locations, the truck, the uniform, the colour and every text:
config.lua,config_sites.lua,locales/. - Prices, wages, loot, ranks, caps:
server/config.lua. - Your own rules without editing our files:
custom/server.lua(hooks) — see API.md.
Full reference: CONFIG.md.
Moving from acc_tradie
Run /tradieimport (a dry run that changes nothing), read the report, then /tradieimport run, from the server console or as staff, before anyone works on cc_tradie. It reads tradie_jackhammers, tradie_tool_chests, players.metadata.acc_tradie and tradie_cargo_runs and never alters them. Running it twice imports once.
Updating
Replace every file except the ones you edited (config.lua, config_sites.lua, server/config.lua, custom/, locales/, presets/). Read the CHANGELOG.md shipped with the resource for new keys: a missing key falls back to its default and is named in the console. Database changes migrate themselves on start.