OPX//77
opx_infinitydowned

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.

Sideboth
Requirescharacter (hard)
Contractdowned v1 — server, client
Configconfig/downed.lua (shared)
Dataopx77_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 entry downed.revive.denied.

Configuration

config/downed.lua sets OPX.Config.MODULES.downed. Shared.

KeyDefaultEffect
enabledtruefalse switches the module off.
GIVE_UP_AFTER_S120Seconds down before give up unlocks (0–3600). Enforced on the server.
GIVE_UP_HOLD_MS1500How long the give-up button must be held (minimum 300).
RESPAWN{ HEALTH = 0.5, GRACE_MS = 5000 }After give up: fraction of full health (0.01–1) and spawn protection in ms (0–60000).
HOSPITALSone row: Watson medical center at -667.14, -382.61, 9.16, heading 0.0Respawn points { LABEL, X, Y, Z, HEADING }. The nearest wins. No usable row: give up is refused no_hospital.
REVIVE{ HEALTH = 0.35, GRACE_MS = 3000 }What a contract Revive leaves the player with.
REVIVERS'*'Callers allowed to Revive: '*' for all, or a set { name = true }. The name is the caller's own claim: a switch, not a security boundary.
SUSPENDERS{ admin = true }Callers allowed to Suspend the screen; keys are the module ids passed to Suspend.
VANILLA_HUDall 13 componentsGame HUD components hidden while down: minimap, compass, clock, health, stamina, weapon, speedometer, questTracker, phone, scanner, vanillaNotifications, crosshair, hubMenu.

Refusal codes

CodeMeaningPlayer text
too_soonGive up before GIVE_UP_AFTER_S.medic.refused.too_soon
no_hospitalNo usable HOSPITALS row.medic.refused.no_hospital
respawn_refusedThe host refused the respawn.medic.refused.respawn_refused
not_incarnatedThe player has no body in the world.medic.refused.not_incarnated
gate_closedThe player is still joining.medic.refused.gate_closed
gate_unreadableThe readiness gate could not be read.medic.refused.gate_unreadable
failedAny other code (generic).medic.refused.failed
not_downRevive on a player who is not dead.—
bad_playerNot a whole positive player id.—
invalid_caller / caller_deniedMissing caller name, or not in REVIVERS / SUSPENDERS.—

On this page