Studios
House Robberyhouse-1.jpg

Commands & Exports

House RobberyQBCore · Qbox · ESX
PAGE 06 OF 06  ·  TROUBLESHOOTING → COMMANDS & EXPORTSdocs.glitchstudios.dev
Browse docs

Commands#

Command Who What
/houserobsadmin command.houserobsadmin (group.admin by default) Admin menu: tiers, rules, loot, shells, live robberies. F7 toggles the mouse.
/hr_spot [safe] [label] group.admin Layout editor: search spot where you stand.
/hr_carry group.admin Layout editor: carry spot.
/hr_alarm group.admin Layout editor: alarm panel in front of you.
/hr_entry group.admin Layout editor: arrival point, facing into the house.
/hr_undo group.admin Remove the last search spot.
/hr_layout group.admin Show what this interior has.
/hr_test [tier] group.admin Open a test robbery at the nearest listed house. Only with Config.Debug = true.
/hr_end group.admin End the robbery you are in or nearest to. Only with Config.Debug = true.
/hr_offset group.admin Print your offset from the shell origin. Only with Config.Debug = true.
/hr_debug Everyone Print what this client knows about its robberies. Only with Config.Debug = true.

Server exports#

Registered for glitch-criminaltablet. Other resources can call them the same way.

-- nil when the contract can run, otherwise the reason as text
local why = exports['glitch-houserobbery']:StartProblem(locationId, crewId, isHot, sources)

-- nil when open, 'police' when only short on police, 'closed' when no house can be handed out
local state = exports['glitch-houserobbery']:ContractClosed(locationId)

-- { [jobId] = reason } for house jobs these players cannot start (no Burglary tier perk)
local blocks = exports['glitch-houserobbery']:JobBlocks(sources)

sources is a list of player server ids.

Client exports#

-- Start the disassemble flow for an inventory slot
exports['glitch-houserobbery']:Disassemble(slot, name)

Events#

Event Side Use
glitch-houserobbery:client:disassemble Client Trigger from an item button with the slot to start Disassemble.
glitch-houserobbery:rc:requestJob, rc:cancelJob, rc:restrain, rc:tip Client Fired by the rc-interactions flow. The server re-checks each one.
glitch_criminaltablet:crewChanged Server Listened to when the tablet's crew changes.

The resource also registers internal events for noise, carrying, shell reports and Dodge's face capture. They are validated on the server and are not meant to be called by other resources.

State#

GlobalState['glitch-houserobbery:open'] holds the list of open houses. Late joiners read it, and their own robbery comes from the getMine callback.

Callbacks#

Client scripts talk to the server through lib.callback. They are internal and validated on the server, but listed here for reference.

Callback Purpose
glitch-houserobbery:breachStart, breachFinish Pick or force the front door.
glitch-houserobbery:enter, leave, finish Enter, leave and settle a robbery.
glitch-houserobbery:searchStart, searchFinish, openSpot Timed searches.
glitch-houserobbery:carryStart, carryTake, carryRun Timed taking of big items.
glitch-houserobbery:disassembleStart, disassembleFinish Disassemble flow.
glitch-houserobbery:homeownerSpawned, restrain, homeownerHold, homeownerTip Homeowner handling.
glitch-houserobbery:contactStatus, jobRequest, jobCancel The contact NPC.
glitch-houserobbery:getMine, policeDoors, getLayouts, getAdminOverrides, admin State and admin data.

Compatibility notes#

Checks that stay on the client by design are the lockpick minigame result, the careful-hands skill check and the movement noise meter. The server enforces a minimum time for each and counts loud actions itself.