downed
Last updated on
Death and revive — who is down, the full-screen down view, waiting for help, giving up at a medical centre, and reviving through the contract.
A player whose life phase becomes dead (with a character loaded) is down. They see a full-screen view with two choices: wait for help (marks them as waiting, a distress signal other modules can list) or give up (unlocks after a delay, wakes them at the nearest configured medical centre). Staff or job modules stand a player up through Revive; nothing else in the runtime respawns a dead player. Being down survives a disconnect: the player is put back down when they return with the same character. Nothing about being down is read or written until the join has placed the body (waited up to 30 s for a death, 10 min for a restore), so the placement's own respawn does not revive a player who quit while down.
| Side | both |
| Requires | character (hard) |
| Contract | downed v1 — server, client |
| Config | config/downed.lua (shared) |
| Data | opx77_character_down (one row per character: citizen_id, down_for_ms, waiting) |
- Each request event is limited to one per second per player. The server also rescans every player's life state each second.
- Audit entries:
downed.down,downed.up,downed.wait,downed.giveUp,downed.revive,downed.restore, and the security entrydowned.revive.denied.
Configuration
config/downed.lua sets OPX.Config.MODULES.downed. Shared.
Refusal codes
| Code | Meaning | Player text |
|---|---|---|
too_soon | Give up before GIVE_UP_AFTER_S. | medic.refused.too_soon |
no_hospital | No usable HOSPITALS row. | medic.refused.no_hospital |
respawn_refused | The host refused the respawn. | medic.refused.respawn_refused |
not_incarnated | The player has no body in the world. | medic.refused.not_incarnated |
gate_closed | The player is still joining. | medic.refused.gate_closed |
gate_unreadable | The readiness gate could not be read. | medic.refused.gate_unreadable |
failed | Any other code (generic). | medic.refused.failed |
not_down | Revive on a player who is not dead. | — |
bad_player | Not a whole positive player id. | — |
invalid_caller / caller_denied | Missing caller name, or not in REVIVERS / SUSPENDERS. | — |