State Bags
Global states to access information instantly across all resources depending on client or server for Wasabi Ambulance Job V2 (wasabi_ambulance_v2).
Player State Bags
isDead
Tracks the player's death state. This is the primary state bag for death/alive status.
| Key | Type | Replicated | Description |
|---|---|---|---|
isDead | boolean|nil | Yes | false or nil = Alive |
true = Dead |
Read example (client):
local deathState = LocalPlayer.state['isDead']
-- Or for another player
local deathState = Player(serverId).state['isDead']
Read example (server):
local deathState = Player(source).state['isDead']
wasabi:lastStandAnim
Syncs last-stand crawling animation data between players.
| Key | Type | Replicated | Description |
|---|---|---|---|
wasabi:lastStandAnim | table|nil | Yes | Animation state data for last-stand crawling. |
-- When moving
{ moving = true, phase = 0.5, coords = vector3(...), heading = 180.0 }
-- When stationary
{ moving = false, current = 0.5, target = 1.0, coords = vector3(...), heading = 180.0 }
wasabi_medbag
Tracks whether a player has a medbag equipped/placed.
| Key | Type | Replicated | Description |
|---|---|---|---|
wasabi_medbag | any|nil | Yes | Medbag state. Set to nil when cleared. |
Entity State Bags
Stretcher Entity
| Key | Type | Description |
|---|---|---|
stretcher:id | string | Unique stretcher identifier. |
stretcher:occupied | number|nil | Server ID of the player on the stretcher. |
stretcher:moving | number|nil | Server ID of the player moving the stretcher. |
stretcher:inVehicle | number|nil | Network ID of the vehicle the stretcher is in. |
Read example (client):
local stretcherStates = Entity(stretcherEntity).state
local stretcherID = stretcherStates['stretcher:id']
local isStretcherOccupied = stretcherStates['stretcher:occupied']
Ambulance Vehicle
| Key | Type | Description |
|---|---|---|
ambulance:hasStretcher | boolean | Whether the vehicle has a stretcher attached. |
ambulance:stretcherID | string | The stretcher's unique ID. |
ambulance:stretcherNetID | number | The stretcher entity's network ID. |
ambulance:stretcherOccupied | number|nil | Server ID of the player on the stretcher. |
Read example (client):
local hasStretcher = Entity(vehicle).state['ambulance:hasStretcher']
local stretcherID = Entity(vehicle).state['ambulance:stretcherID']
Global State Bags
pingEMS_<serverId>
Returns timestamp of last EMS ping by defined player. Used for cooldown tracking