Studios
Criminal Tablethouse-3.jpg

Commands & Exports

SoonCriminal TabletQbox
PAGE 06 OF 08  ·  TROUBLESHOOTING → COMMANDS & EXPORTS → ADMIN TABdocs.glitchstudios.dev
Browse docs

Commands#

Command What it does
/tablet Toggles the tablet. Name set by Config.CommandName ('' disables it). With Config.CommandRequiresItem the player must carry their own tablet

There are no admin chat commands. Everything admin is in the tablet's Admin tab.

Server exports#

All are exports['glitch-criminaltablet']:Name(...).

Export Returns or does
HasActiveContract(src, locationId) true if the player's crew holds that contract
GetActiveContract(src) The locationId the crew holds, or nil
ClaimContract(src, locationId) Claim a contract for the player's crew
ReleaseContract(locationId) Free a contract
ExtendContract(locationId, seconds) Extend a claimed contract
ClaimPickupContract(src, jobId, dryRun) For pickup-only jobs: claim a random free contract of that job for the crew. Returns ok, message, locationId
RegisterContractLocations(entries, slotsPerJob?) Add your own sites as dynamic contracts ({ id, jobId, name, coords, weight? }). Register again after a restart
GetContractsData() Snapshot of every contract slot
GetClaimedContracts(jobIds) Claimed contracts for those jobs: { [locationId] = { crewId, jobId, isHot } }
GetContractSources(locationId, strict?) Online sources of the people doing the job on a contract
CompleteActiveJob(src, jobId?) Complete the crew's running tablet job. Returns true, or false plus a reason
GetActiveJob(src) The jobId the crew is running, or nil
CanCrewRunJob(crewId, jobId) Crew size and member cooldown check. Returns true, or false plus a message
SetEvidenceFlag(src, jobId, clean) Record a clean run for the next payout
GetLineup(src, jobId) The lineup the crew picked: { locationId, sources, endTime }
CancelLineup(src, jobId) The job script could not start; the crew keeps its contract
TakeHeistSlot(jobId, crewId), ReleaseHeistSlot(jobId), FailHeist(sources, jobId) The server-wide heist slot
CheckJobGate(src, jobId), ConsumeRequiredItem(src, jobId), JobRepOk(src, jobId) Gates for a job
GetReputation(src), AddReputation(src, n), SetReputation(src, n) REP
GetJobConfig(jobId), GetJobCompletionCount(src, jobId), GetPlayerData(src) Raw config and data
ResetCooldown(src, jobId?), ResetPlayer(src) Admin helpers
AddHeat(src, n), ResetHeat(src) Heat
Arrested(src) Apply the arrest penalty (for prison scripts)
GetDirtyMoney(src), GiveDirtyMoney(src, n), TakeDirtyMoney(src, n) Dirty money
GetCrew(src) { id, name, role, tier, rep } or nil
IsInGroup(src), GetGroupMembers(src), GetCrewSources(crewId) Crew membership
IsCrewVerified(src), IsCrewIdVerified(crewId) Whether the crew has turf approved
MessageCrew(crewId, contactId, body, locationId?), MessagePlayer(src, contactId, body) Tablet inbox messages from a contact
GetContact(contactId), MeetContact(src, contactId), HasMetContact(src, contactId) Contacts
GetTrust(src, contactId), AddTrust(src, contactId, amount) Contact trust
SetContactCoords(contactId, coords) An external contact's resource moved its ped; the pin follows
SetContactActionLock(src, contactId, untilTs) Lock a contact action until a time
GetReferralStage(src, toContactId) 'sent', 'met' or 'none'
GetTurfAt(coords) { zoneId, label, crewId, crewName, contested } or nil
GetTurfBonus(src, coords), ReportTurfActivity(src, coords, label, count), AddTurfPressure(src, coords, amount) Turf
LearnIntel(src, facts, level?) Teach Board facts. Level 1 rumour, 2 word (default), 3 confirmed
UnlockPlace(src, placeId) Put a place on the player's upgraded tablet map for good
DyePack(src, opts), IsDyed(src), StartTracker(src, opts), StopTracker(src), HasTracker(src), LootTraps(src, opts), MarkedWorth(src) Loot traps
IsVinScratched(vehicleId), BoostLockRequest(src, veh, state) Boost car helpers
GetSellPrices(), MissingFromPawn(items) What the Fence and the pawn counter buy, so job scripts can price loot
LogEvent(category, ref, amount, src?), LogActivity(src, data), Log(src, event, message, data, opts) Admin economy log, Stats tab history and the action log
PoliceOnDuty() On-duty police count
HasAdminBypass(src, kind), HasOwnAdminBypass(src, kind) Testing bypass. kind is police, rep, cooldown or job
IsFeatureOff(id), MaintenanceState() Maintenance switches set in the Admin tab
AdminGetCharacter(identifier), AdminSetCharacter(identifier, changes) Read or change a character's tablet row
useTablet The ox_inventory item export for glitch_tablet and glitch_tablet2

Client exports#

Export Returns or does
HasAdminBypass(kind) The local player's testing bypass
HoldsContract(locationId) Whether the local player's crew holds that contract (cheap enough to call every frame)
GetContactPed(contactId) The contact NPC this client spawned
unpackMoneyBag(slot) ox_inventory item export for money_bag
useTrackerDisabler() ox_inventory item export for tracker_disabler

Server events#

These are server-only. A call that comes from a client is ignored.

Event Use
glitch_criminaltablet:reportJobComplete Report a finished external job (see Examples)
glitch_criminaltablet:completeActiveJob (src, jobId): complete the crew's running tablet job
glitch_criminaltablet:setEvidenceFlag (src, jobId, evidenceClean): record a clean run
glitch_criminaltablet:resetHeat (targetSrc): reset a player's heat

The tablet also triggers these server events for you to listen to:

Event When
glitch_criminaltablet:crewChanged (groupId) after crew membership changes, so robbery scripts can re-sync their crew
glitch_criminaltablet:lineupStarted (src, jobId, locationId, people) when a crew starts a lineup job
glitch_criminaltablet:contactActionUsed (src, contactId, actionId) when a contact action is used

Callbacks#

The tablet's own ox_lib callbacks and net events are registered through RegisterTabletEvent and RegisterTabletCallback and are meant for the tablet UI only. They are not a public API. Use the exports and server events above.