Documentation Index
Fetch the complete documentation index at: https://docs.cc-scripts.com/llms.txt
Use this file to discover all available pages before exploring further.
cc_heistcontracts ships three console commands. Two are debug-only (un-restricted) and one is ACE-gated.
/heist:grantxp <alias> <amount>
Grant XP to a profile by alias. Handles level-ups and pushes a fresh profile sync to the recipient if they’re online.
| Restricted | Yes — restricted = true on the registration. |
| Allowed callers | Console (source 0), or in-game admins with the command.heist:grantxp ACE permission, or the admin ace. |
| Online recipient | Mutates the cached profile, marks it dirty (next 30s flush persists it), and immediately calls _G.HeistSync.SendProfile(src) so the dashboard updates without waiting for the next sync request. |
| Offline recipient | Resolves alias → citizenid via a single SELECT, computes the new level/XP, and updates the row directly. Doesn’t pollute the in-memory cache (no owner src). |
ACE setup
Either grant the dedicated permission:admin ace. Built-in superadmins are usually in group.admin already.
Output
invalid_amount (zero/negative), db (UPDATE didn’t affect any rows).
/heist:test and /heist:test2
Both are un-restricted dev commands that exist to exercise the legacy StartContract path against the seed contracts. They:
- Create a
cc_lib.Groupsgroup named'test'with the caller as leader. - Optionally add a second player as a member:
/heist:test 5adds source 5 to the group. - Call
StartContract('Paleto Heist', { group = 'test', location = { id = 'pinkcage' } })(/heist:test) orStartContract('Fleeca Heist', ...)(/heist:test2).
server/main.lua. If you remove the seeds, both commands will print unknown contract and do nothing.
A reasonable production hardening:
Removing the seed contracts
server/main.lua registers two seed contracts (fleeca_heist, paleto_bank) inside a delayed thread so a fresh server has something to display. Once your real heist resources call RegisterContract, you can delete the seed block:
Resetting a profile (manual)
There’s no command for this — it’s straight SQL:playerDropped evicts them, or restart cc_heistcontracts to flush the entire cache.
Debug logging
config.debug = true in shared/config.lua toggles [DEBUG] lines from utils.dprint. Default is on. Useful lines you’ll see:
[DEBUG] rotation rolled: N contracts, expires in <ms>ms— every rotation roll.[DEBUG] entry_point error for <id>: <msg>— when a contract’s entry point throws on Start.[DEBUG] Profile.GetBySrc: no citizenid for src <n>— citizenid lookup failed (usually means the player isn’t fully loaded into the core yet).
config.debug = false. Server prints only happen on actual failures after that.