Skip to main content

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.

KeyTypeReplicatedDescription
isDeadboolean|nilYesfalse 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.

KeyTypeReplicatedDescription
wasabi:lastStandAnimtable|nilYesAnimation 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.

KeyTypeReplicatedDescription
wasabi_medbagany|nilYesMedbag state. Set to nil when cleared.

Entity State Bags

Stretcher Entity
KeyTypeDescription
stretcher:idstringUnique stretcher identifier.
stretcher:occupiednumber|nilServer ID of the player on the stretcher.
stretcher:movingnumber|nilServer ID of the player moving the stretcher.
stretcher:inVehiclenumber|nilNetwork 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
KeyTypeDescription
ambulance:hasStretcherbooleanWhether the vehicle has a stretcher attached.
ambulance:stretcherIDstringThe stretcher's unique ID.
ambulance:stretcherNetIDnumberThe stretcher entity's network ID.
ambulance:stretcherOccupiednumber|nilServer 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