Studios
Store Robberyhouse-3.jpg

Commands & Exports

SoonStore RobberyQbox
PAGE 06 OF 06  ·  TROUBLESHOOTING → COMMANDS & EXPORTSdocs.glitchstudios.dev
Browse docs

Commands#

Both commands are restricted to group.admin.

Command Who What
/storedrill group.admin Saves the spot you stand on as the drill position for the nearest store safe within 5 m. Add clear to remove the saved spot.
/storereset group.admin Reopens every closed store and drops all CCTV footage. Cooldowns and active runs belong to the engine: use /heisteditor.

Exports#

This resource has no exports of its own. On the client it registers a drill preset named store_drill with glitch-heistEditor, and it uses the engine's GetPoint, GetSites and RegisterPreset exports.

Integration with other resources#

Resource How it is used
glitch-heistEditor Runs the robbery from the definitions in heist/store.lua. Restart it before this resource.
glitch-minigames StartSkillCheckGame, StartDrilling and StartLockpickGame for the register, drill and dial.
glitch-criminaltablet Contracts and an admin testing bypass, when Config.Integrations.tablet names it.
glitch-economy Crime ledger entries for lottery items and prizes.
glitch-admin A staff log entry when a client sends something it should not.
ox_inventory Shop hooks (openShop, buyItem) refuse sales within 25 m of a dead clerk.

Events#

Event Side What
glitch-storeRobbery:clerkKilled Server Fired by the engine when a clerk dies. The payload carries heist, site, src and data.respawn (seconds). Other resources can listen with AddEventHandler.
glitch-heistEditor:runStarted and runJoined Server Sent by the engine. This resource starts recording robbers when a store run starts or is joined.
glitch-storeRobbery:cctvRecord Server, from client A robber's client sends the clothes, props and weapon it had out. The server reads model, position and heading itself and accepts each robber once per tape.
glitch-storeRobbery:cancel Server, from client Cancels the player's own wipe lock and starts a short retry delay.
glitch-storeRobbery:scratch Client Tells the client to start scratching a ticket.
glitch-storeRobbery:cctvSnap Client Asks the robber's client for the cosmetic part of the tape.

Callbacks#

These are lib.callbacks. The server checks the player's job, distance to the back office and elapsed time before it does anything.

Callback What
glitch-storeRobbery:cctvPull Police only. Returns the footage for a store, or none or wiped.
glitch-storeRobbery:cctvWipeStart Starts a wipe and returns the time to wait.
glitch-storeRobbery:cctvWipeDone Finishes a wipe after the full wipe time has passed.
glitch-storeRobbery:scratchDone Takes the ticket and returns the prize.

State#

Key What
GlobalState['gsr:closed'] [siteId] = os.time() when the clerk is back. Shared so players who join late see closed stores.
GlobalState['gsr:drillspots'] Saved drill spots by site id, each with x, y, z and h.