Studios
Casino Heisthouse-3.jpg

Commands & Exports

SoonCasino HeistQbox
PAGE 06 OF 06  ·  TROUBLESHOOTING → COMMANDS & EXPORTSdocs.glitchstudios.dev
Browse docs

Commands#

This resource registers no commands. The heist is managed from /heisteditor in Glitch Heist Editor: pick Diamond Casino, then Live to end a run, clear the cooldown or open every door.

Client exports#

Export signature Description
ToggleNightvision() Turns night vision on or off for the local player and plays the mask animation. Takes no arguments.
exports['glitch-casinoHeist']:ToggleNightvision()

Server exports#

None.

Events#

Both are server-side events that the heist definition fires through the engine's event action.

Event Fired when Data
glitch-casinoHeist:runStarted A run starts A table e where e.src is the starting player's server id
glitch-casinoHeist:runEnded The crew escapes or the run fails None used
AddEventHandler('glitch-casinoHeist:runStarted', function(e) end)
AddEventHandler('glitch-casinoHeist:runEnded', function() end)

Callbacks#

None. The resource registers no net events or callbacks of its own. All step checks run in glitch-heistEditor.

Presets#

The resource registers these presets with the engine on the client. Steps in the definition use them, and you can assign them to your own steps in /heisteditor.

Preset What it does
casino_bomb The charge planting scene. Puts the player's bag back afterwards.
casino_door The doorway cutscene.
casino_swipe The keycard swipe scene.
casino_cams Connects to glitch-securityCameras. Passes when that resource is missing.

Run flags#

The client reads two flags from the engine's run state for the current site: blackout and lasers. The blackout effect and the laser beams follow them.

Calls this resource makes#

Resource Used for
glitch-heistEditor RunState, RegisterPreset, and the glitch-heistEditor:ready event
glitch-securityCameras AddCamera, AttemptCameraHack
vSync LocalBlackout
ox_doorlock getAllDoors, getDoorFromName, createDoor
ox_inventory Items, for the start-up item check