Death State Constants
Numeric states to determine the state or stage of death with examples for Wasabi Ambulance Job V2 (wasabi_ambulance_v2).
The death system uses numeric states:
| Constant | Value | Description |
|---|---|---|
ALIVE | 0 | nil | Player is alive and healthy. |
LAST_STAND | 1 | Player is downed and crawling (can still be revived without full death). |
DEAD | 2 | Player is fully dead (death screen active). |
These values are stored in the wasabi:deathState player state bags and can be read from any script.
*This statebag can be changed in config/shared/config.lua.
Example — Checking death state from another resource:
-- Client-side
local deathState = LocalPlayer.state['wasabi:deathState'] or 0
if deathState == 0 then
print("Player is alive")
elseif deathState == 1 then
print("Player is in last stand")
elseif deathState == 2 then
print("Player is dead")
end
-- Server-side
local deathState = Player(source).state['wasabi:deathState'] or 0