Skip to main content

State Bags

Replicated state exposed by Wasabi Police Job V2 (wasabi_police_v2).


Player state bags

KeyTypeDescription
cuffstable|nilCanonical V2 cuff state: flags, position, and cuff item. A zero/absent state means uncuffed.
cuffedbooleanV1 reverse-compat: true when cuffed, false when uncuffed.
wasabi:police:surrenderingstring|falseCurrent surrender mode or false.
wasabi:police:complianceScorenumberCurrent surrender/compliance score.
wasabi:police:jailedtable|nilActive sentence, reason, and start time.
wasabi:police:trackertable|nilTracker application metadata (by and since).
wasabi:police:escortednumber|falseEscorting officer's server ID or false.
wasabi:police:beingSearchedbooleanWhether a police search is active.
wasabi:police:gsrtable|falsePositive GSR metadata or false.

Wasabi Police v1 compatibility

V2 keeps the rich cuffs table as the source of truth, and also mirrors a boolean state.cuffed for scripts written against wasabi_police (v1). Prefer cuffs or the isPlayerCuffed export for new integrations.

On QBCore and Qbox, V2 also sets player metadata ishandcuffed to true/false alongside cuff changes, matching the v1 framework bridge behavior.

Read examples

local state = Player(serverId).state

local cuffs = state.cuffs
local cuffed = cuffs and cuffs.flags and cuffs.flags ~= 0
-- or, for v1-compatible checks:
-- local cuffed = state.cuffed == true
local jailed = state['wasabi:police:jailed']
local tracker = state['wasabi:police:tracker']
local gsr = state['wasabi:police:gsr']
warning

Treat replicated state as read-only integration data. Use the documented server exports and normal Police V2 workflows to perform mutations.

Global state

KeyTypeDescription
wasabi:police:onlineCountnumberCurrent number of online officers counted by the duty module.
local onlinePolice = GlobalState['wasabi:police:onlineCount'] or 0

Entity state

CCTV camera entities use the camera_destroyed state to synchronize whether a destructible camera has been broken.

local destroyed = Entity(cameraEntity).state.camera_destroyed == true