RedM documentation

Murphy's Doctor

Configuration

Coma


This page covers shared/config_coma.lua: what happens when a player reaches 0 HP, how long the coma lasts, the death camera and the server-side protection against early exits. Coma-related settings that live in other files are listed at the end.

How the coma works

  1. When a player reaches 0 HP, they do not die: they fall into a coma. The cause is read from the last hit (weapon, headshot, melee) or from what drained them (bleeding, wound drain, poison).
  2. The coma screen opens with a countdown, the help call buttons and an orbiting camera around the body.
  3. When the countdown reaches 0, the player can click "Get up". By default they get up where they lie, with full health. This behaviour is FrameworkRevivePlayer in client/adapters/<framework>Adapter.lua, which you can edit (to send the player to a hospital, for example).
  4. A doctor can revive the patient at any time with the revive action (item cost: Config.Interactions.Revive, see General settings), or by signing a treatment on them.
  5. Whatever the way out, every severe injury becomes moderate on wake-up, so the player does not fall back at once. The wounds are still there for a doctor to treat.
  6. The coma is saved in the database: a player who disconnects in a coma comes back in a coma, with the remaining time.

Your framework's own death screen must be off (for REDEM:RP, redemrp_respawn must not run). See Installation.

Duration

All durations are in seconds, read by the client.

Key Default Description
Config.Coma.MinCooldown 30 Shortest possible coma. Every computed duration is raised to at least this.
Config.Coma.MaxCooldown 300 Longest possible coma. Every computed duration is capped at this.
Config.Coma.DefaultCooldown 120 Duration used when the cause has no entry in CauseCooldowns.
Config.Coma.CauseCooldowns see below Duration per cause. The value is then clamped between MinCooldown and MaxCooldown.
Config.Coma.DeathCheckInterval 500 Milliseconds between two checks of whether the player is dead. Lower values react faster at a small CPU cost.

For one flat duration whatever the cause, set MinCooldown and MaxCooldown to the same value:

lua
Config.Coma.MinCooldown = 180
Config.Coma.MaxCooldown = 180

Causes

Shipped Config.Coma.CauseCooldowns:

Cause key Seconds When
fall_minor 30 Light fall
beaten 45 Fists, a firearm used in melee (pistol-whip)
fall 75 Fall
slashed 80 Machete, hatchet, cleaver, broken sword, bleeding out from a cut
stabbed 90 Knife, throwing knife
animal 100 Animal attack
burned 140 Fire
shot 150 Firearm or bow, bleeding out from a bullet wound
explosion 180 Explosion
drowned 200 Drowning
poisoned 220 Poison, prescription overdose
headshot 250 Gunshot to the head
unknown 120 Anything else
lua
Config.Coma.CauseCooldowns["shot"] = 240
Config.Coma.CauseCooldowns["headshot"] = 300

The cause names shown to players come from the locale keys causes.<key> in shared/locales/<lang>.lua. Add a key there if you add a cause from your own script.

Camera and effects

Key Default Description
Config.Coma.EnableVisualEffects true Blurred, desaturated screen while in a coma.
Config.Coma.Cinematic.Enabled true Cinematic intro and idle orbit of the death camera. false keeps a plain mouse-controlled orbit.
Config.Coma.Cinematic.IntroSeconds 4.0 Seconds the camera takes to come down from above the body into the orbit. 0 skips the intro.
Config.Coma.Cinematic.IntroHeight 7.0 Metres above the body where the intro starts. Indoors the camera stops under the ceiling.
Config.Coma.Cinematic.IdleSeconds 3.0 Seconds without mouse input before the camera starts circling on its own.
Config.Coma.Cinematic.IdleOrbitDegPerSec 4.0 Degrees per second of the idle orbit. 0 = no idle orbit.
Config.Coma.WakeUpReminder true On wake-up (doctor or get-up), a notification reminds the player that their character does not remember the last minutes before passing out.

Security

Key Default Description
Config.Coma.ServerExitCheck true The server checks the coma timer before accepting a "get up" from a client (5 seconds of tolerance). An early exit is refused and logged (Discord revive log); the coma comes back on the next connection. Revives performed by the server itself (doctor, treatment, staff command) are always accepted. false trusts the client.

If another resource revives players on its own (an admin menu, for example), it must call the server export exports.murphy_doctor:AuthorizeComaExit(serverId) just before, otherwise the coma comes back at the next connection. The VORP and RSG admin revives are already wired in the server adapters. See Server exports.

Optional server label override

The cause text stored with a coma (shown, for example, as the cause of coma on the treatment form and in the incident records) comes from the causes.* keys of the language file of Config.Locale (shared/locales/<lang>.lua). To change it, edit those keys.

Config.Coma.CauseLabels is not in the shipped file. When you add it, each cause it lists overrides the language file; the causes it leaves out keep the locale text.

lua
Config.Coma.CauseLabels = {
shot = "Took a bullet",
headshot = "Shot in the head",
-- only the causes you want to rename
}

Guaranteed injury

When a player falls into a coma without an injury of the matching type, a severe injury is added on the last hit body zone (falls always go on a leg or a foot, otherwise head for a headshot and belly by default). This keeps the examination consistent with the cause. The mapping is built into client/coma.lua:

Cause Injury type added
shot, headshot projectile
stabbed, slashed, animal cut
burned, explosion burned
fall fractured
beaten, fall_minor, drowned, poisoned bruised

Keys kept for compatibility

These keys are in the shipped file but not read by 1.0. Changing them has no effect.

Key Default
Config.Coma.BlockControls true
Config.Coma.EnableRagdoll true
Config.Coma.AnimDict "script_re@public_hanging@victim"
Config.Coma.AnimName "hang_struggle"
Setting File Page
Config.Interactions.Revive.Item, .Amount config.lua General settings
Config.HelpCall.AutoCallOnComa, AutoCallDelay, CallCooldown, PredefinedReasons (buttons of the coma screen) config_helpcall.lua Help calls
Config.Transport (carry, stretcher, bed for a patient in a coma) config_transport.lua Transport
Config.Incidents (every coma is recorded for the law) config_incidents.lua Records and autopsy
Config.Autopsy.Players (autopsy of a player in a coma) config_records.lua Records and autopsy
DoctorWebhooks.coma, .revive server/adapters/webhooks.lua General settings
Config.Treatment.PrescriptionDebuffs (severe overdose puts the patient in a coma) config_treatment.lua Treatment
Config.Poison (poisons that force a coma) config_poison.lua Poison
Config.DamageDetection.Bleeding.HealthDamage.CanKill (bleeding that can cause a coma) config_damage.lua Damage and injuries

Last updated: November 20, 2026