State Bags
Replicated state exposed by Wasabi Police Job V2 (wasabi_police_v2).
Player state bags
| Key | Type | Description |
|---|---|---|
cuffs | table|nil | Canonical V2 cuff state: flags, position, and cuff item. A zero/absent state means uncuffed. |
cuffed | boolean | V1 reverse-compat: true when cuffed, false when uncuffed. |
wasabi:police:surrendering | string|false | Current surrender mode or false. |
wasabi:police:complianceScore | number | Current surrender/compliance score. |
wasabi:police:jailed | table|nil | Active sentence, reason, and start time. |
wasabi:police:tracker | table|nil | Tracker application metadata (by and since). |
wasabi:police:escorted | number|false | Escorting officer's server ID or false. |
wasabi:police:beingSearched | boolean | Whether a police search is active. |
wasabi:police:gsr | table|false | Positive 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
| Key | Type | Description |
|---|---|---|
wasabi:police:onlineCount | number | Current 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