RedM documentation
Murphy's Doctor
Developers
State bags
murphy_doctor uses a few replicated state bags. They are the cheapest way for another resource to know whether a player is down, being moved, or wearing a face mask, without calling an export.
Keys written by murphy_doctor
| Key | Bag | Type | Written by | Replicated | Meaning |
|---|---|---|---|---|---|
murphy_doctor:coma |
Player(src).state |
true or nil |
server, checked every second | yes, to every client | The player's character is in a coma (as recorded by the server). |
murphy_doctor:moved |
Player(src).state |
"carried", "stretcher", "bed" or nil |
server | yes | The player is carried on a shoulder, lying on a stretcher or in a dispensary bed. |
doctorFaceCovered |
Player(src).state (set by the owner through LocalPlayer.state) |
boolean | client of the player, every CheckIntervalSeconds |
yes | Nose and mouth are covered by a mask (ped components of the Config.Infection.Proximity.FaceCovered.Categories categories). Lowers the chance of catching a disease from a nearby player. |
Availability:
murphy_doctor:comaandmurphy_doctor:movedare written by the transport module: they exist whileConfig.Transport.Enabledis notfalse(the default).doctorFaceCoveredis only published whenConfig.Infection.Enabled,Config.Infection.Proximity.EnabledandConfig.Infection.Proximity.FaceCovered.Enabledare all on. A missing value means "not covered".
Keys read by murphy_doctor
| Key | Bag | Type | Set by | Used for |
|---|---|---|---|---|
murphy_doctor:skinTone |
Player(src).state |
string: sc01, sc02, sc03, sc04, sc05 or sc08 |
your character creator (optional) | Skin tone of the skin patch used by the surgery and injection minigames. Without it, Config.Minigames3D.DefaultTone is used. |
murphyLocale |
GlobalState |
string (language code) | murphy_platform (optional) |
Overrides Config.Locale for the NUI. |
Reading them from another resource
Publishing the skin tone from a creator
Set it once the character is loaded, replicated so the server can read it:
Use the codes of the multiplayer heads (sc01, sc02, sc03, sc04, sc05, sc08).
What is not in a state bag
Use exports or events for these:
| Information | Where to read it |
|---|---|
| Duty status | server export IsDoctorOnDuty(src), client event murphy_doctor:dutyChanged |
| Body temperature, hunger, thirst, injuries | client exports GetBodyTemperature, GetHunger, GetThirst, GetLocalHealthData (local player only) |
| Doctor status | server export IsPlayerDoctor(src), client export IsLocalPlayerDoctorCached() |
| Diseases, immunities, addictions | server exports GetMedicalFile, IsImmune, GetAddictions |
| Coma of the local player, with timer | client exports IsInComa, GetComaTimeRemaining |
The coma state bag mirrors the server record, so it can lag the client's own coma screen by up to a second.
Last updated: November 20, 2026