Installing cc_lib
cc_lib has no hard dependencies. It starts on a bare server and adapts to whatever else is running, so the only thing that matters is start order: cc_lib looks at what is started when a resource first
cc_lib has no hard dependencies. It starts on a bare server and adapts to whatever else is running, so the only thing that matters is start order: cc_lib looks at what is started when a resource first uses it, so start your framework and the resources it should talk to first.
1. Files
- Download
cc_lib-<version>.zipfrom your Cfx.re Keymaster (Granted Assets) or the Tebex download link. - Unzip it into your resources folder, e.g.
resources/[cartel]/cc_lib. - The folder must be called
cc_lib. Every Cartel script loads@cc_lib/init.lua; a folder namedcc_lib-mainorcc_lib-1.13.0breaks them all.
2. server.cfg
Put ensure cc_lib after your core stack and before every Code Cartel resource.
Qbox
ensure oxmysql
ensure ox_lib
ensure qbx_core
ensure ox_inventory
ensure ox_target
# ... your phone, dispatch, keys, fuel, clothing ...
ensure cc_lib
ensure cc_yourscriptQBCore
ensure oxmysql
ensure qb-core
ensure qb-inventory # or ox_inventory / qs-inventory / ...
ensure qb-target # or ox_target
ensure cc_lib
ensure cc_yourscriptESX Legacy
ensure oxmysql
ensure es_extended
ensure ox_inventory # or your ESX inventory
ensure ox_target
ensure esx_billing # optional, used by CC.billing
ensure cc_lib
ensure cc_yourscriptox_core
ensure oxmysql
ensure ox_lib
ensure ox_core
ensure ox_inventory
ensure ox_target
ensure cc_lib
ensure cc_yourscriptStandalone (no framework) — just ensure cc_lib before your scripts. Money uses inventory items (money, black_money), there is no bank and no jobs; see COMPATIBILITY.md.
3. First boot
On start cc_lib prints:
- a table of every category and the resource it picked (or
fallback); config.lua and server/config.lua: OK, or one line per problem in your config.
Type cc in the server console to print the table again (in game it needs the ACE cc_lib.diagnostics):
add_ace group.admin cc_lib.diagnostics allowcc_validate re-checks the config files.
4. Configure (optional)
Everything works with the defaults. To change something open config.lua (public) or server/config.lua (webhooks, secret). Reference: CONFIG.md. After editing: restart cc_lib, then restart the resources that use it (or the server).
Already set cc:* convars in server.cfg? They keep working and win over config.lua.
5. Updating
- Back up your
config.lua,server/config.luaand anylocales/file you changed. - Replace the folder with the new version.
- Put your three files back. New settings added in an update have built-in defaults, so an old
config.luakeeps working; CHANGELOG.md lists every new key. - Restart the server (not just cc_lib — every Cartel resource loaded the old init).
cc_lib follows semantic versioning: a minor version (1.12 → 1.13) never changes a function a product calls; a major version (2.0) says so in the changelog.
6. Uninstalling
Remove ensure cc_lib and the folder. Every Code Cartel script will refuse to start with "cc_lib is not started" — that is expected; they need it.
Why cc_lib is not escrowed
Cartel products are escrowed; cc_lib cannot be. Other resources load its files across resources (@cc_lib/init.lua) and its modules with LoadResourceFile, and an encrypted file can only be read by its own resource. Shipping it open is also what lets you check exactly what it does with your server.