RedM documentation
Murphy's Doctor
Getting Started
Integrations
murphy_doctor runs on its own: the only hard dependency is oxmysql, plus your framework. Every resource on this page is optional and detected while the server runs. When it is started, murphy_doctor uses it; when it is not, a built-in fallback takes over. You never have to edit the manifest to enable or disable one.
Framework specifics (jobs, money, inventory, death flag) are on Frameworks.
Overview
| Resource | What it adds | Without it | Started or stopped while the server runs |
|---|---|---|---|
murphy_interact |
3D interaction targets for the doctor actions and the dispensary points | Native RedM prompts | Picked up or dropped within a second |
murphy_radialmenu |
Doctor, health, tools and HUD slots in the radial wheel | Prompts (murphy_interact or native) | Picked up or dropped within a second |
murphy_notify 2.0+ |
The shared Murphy notification box | murphy_doctor's own copy of that box | Checked on every notification |
murphy_platform |
Server-wide interface language, activity feed | Interface follows Config.Locale |
Language followed live |
murphy_politics |
Municipal tax on paid invoices (off by default) | Invoices are not taxed | Checked on every payment |
murphy_craft |
The doctor specialisation also counts as doctor (off by default) | Ignored | Checked on each doctor check |
murphy_clothing |
Exact cold and heat protection of the outfit | The outfit is read from the ped | Checked on each temperature update |
weathersync |
Weather input of the temperature system | Weather modifier stays neutral | Event based |
| Discord | Logs posted to Discord webhooks (built in) | No logs | Configuration only |
murphy_interact
When murphy_interact runs, these points use its 3D targets; otherwise they use native RedM prompts:
- the doctor actions on a player: examine, treatment, revive, bandage, surgery (one global player interaction, id
murphy_doctor:auscultate); - the dispensary board and the grimoire point;
- the archives;
- the duty point;
- the treasury point;
- the nurse NPC;
- the apothecary bench.
Each point has a setting with three values:
| Value | Behaviour |
|---|---|
"auto" |
murphy_interact when it is started, native prompts otherwise |
"murphy_interact" |
Always murphy_interact. If it is not started, the point is not offered at all (doc_selftest reports it for the doctor actions) |
"native" |
Always native prompts |
| Setting | Controls | Default |
|---|---|---|
Config.Interactions.PromptType (shared/config.lua) |
Doctor actions on a player | "auto" |
Config.Dispensary.PromptType (shared/config_dispensary.lua) |
Dispensary board and grimoire point | "auto" |
Config.Archives.PromptType (shared/config_dispensary.lua) |
Archives | nil: same as the dispensary |
Config.Duty.PromptType (shared/config_duty.lua) |
Duty point | nil: same as the archives |
Config.Nurse.Treasury.PromptType (shared/config_nurse.lua) |
Treasury point | nil: same as the duty point |
Config.Nurse.PromptType (shared/config_nurse.lua) |
Nurse NPC | "auto" |
The apothecary bench has no setting: it uses murphy_interact when it runs, a native prompt otherwise.
Native prompt keys are set in each config file, for example Config.Interactions.NativeKeys for the doctor actions (E examine, R treatment, F revive, J bandage). Carrying a patient, the stretcher and the beds always use their own prompts (Config.Transport.Keys).
When murphy_interact (or murphy_radialmenu) starts or stops during a session, every point is registered again with the right system within about a second. Players do not need to reconnect.
murphy_radialmenu
When murphy_radialmenu runs, the doctor actions on players are not registered as prompts: they come from the wheel. Its built-in integration file (murphy_radialmenu/integrations/murphy_doctor.lua) adds four slots:
| Slot | For | Actions |
|---|---|---|
| Health | everyone | My health, call a doctor (only when hurt or in a coma), my invoices |
| Doctor | doctors, with a player nearby | Examine, treatment, revive, bandage, surgery, autopsy |
| Doctor Tools | doctors | Unfold a stretcher, call board, grimoire |
| HUD | everyone | Show or hide the HUD, move the HUD |
How a doctor picks the patient is set at the top of that integration file, PATIENT_PICK: 'cursor' (click the patient on screen, default), 'nearby' (a sub-wheel listing the players in range) or 'closest' (the nearest player). The range is PATIENT_RANGE (3.5 m).
The wheel triggers client events that any other menu resource can also use:
| Event | Action |
|---|---|
murphy_doctor:client:radialAuscultate |
Examine |
murphy_doctor:client:radialTreatment |
Treatment screen |
murphy_doctor:client:radialRevive |
Revive (patient in a coma) |
murphy_doctor:client:radialBandage |
Bandage (conscious patient) |
murphy_doctor:client:radialSurgery |
Surgery sheet (conscious patient) |
murphy_doctor:client:radialAutopsy |
Autopsy (patient in a coma) |
murphy_doctor:client:radialStretcher |
Unfold a stretcher |
murphy_doctor:client:radialCallHelp |
Call a doctor |
The patient events take the patient's server id as their argument. Without it, the patient is picked with the wheel's on-screen picker, otherwise the closest player in range. The server checks every action again (doctor status, distance, items). Details: Events.
murphy_notify
With Config.NotifyStyle = "murphy" (default), notifications go through murphy_notify when version 2.0 or newer runs, so all Murphy scripts share the same box. Otherwise murphy_doctor shows its own copy. See Notifications.
murphy_platform
- Language: when the platform publishes a server-wide language, the interface uses it instead of
Config.Locale, and follows it live. Script texts (notifications, prompts) keep followingConfig.Locale. See Localization. - Activity feed: medical events are sent to the platform's live feed: revive given and received, bandage given and received, help call sent and answered, consumable used, item poisoned, alcohol intoxication, nurse heal, duty start and end, treasury withdrawal. Without the platform these messages go nowhere.
murphy_politics
A municipal tax on paid invoices. Off by default, in shared/config_billing.lua:
- When an invoice is paid, the tax rate is read from the
murphy_politics_taxestable for the dispensary's townhall andServiceId. An inactive tax counts as 0. - The tax is credited to the townhall with
exports.murphy_politics:AddTaxRevenue, and the rest goes to the dispensary treasury (or to the doctor). - A dispensary without a
Townhallsentry is not taxed. - When murphy_politics is not started, invoices are not taxed and
doc_selftestprints a warning.
See Billing.
murphy_craft
Off by default, in shared/config.lua:
When enabled and murphy_craft runs, a player who chose the DoctorSpeCraftId specialisation tree in murphy_craft is also a doctor, on top of Config.Interactions.DoctorDetection. The doctor status is refreshed as soon as the player's specialisation changes. The staff command /doc:respe <serverId> resets the DoctorSpeCraftId specialisation of a player through murphy_craft (see Commands and keybinds).
murphy_clothing
The temperature system asks murphy_clothing for the cold and heat protection of the outfit (GetTemperatureProtection). Without it, the outfit is read directly from the ped's clothing categories, which works with any clothing script. See Temperature.
Weather
The temperature system listens to weathersync (weathersync:changeWeather). Any other weather script can feed it from the client whenever the weather changes:
Without a weather source, the weather modifier stays neutral.
Law jobs
Every coma is recorded (cause, weapon, attacker, place) and every autopsy gives a death certificate. Law players can read them:
| Command | Shows | Allowed to |
|---|---|---|
/incidents [name or server id] |
The last coma records (Config.Incidents, shared/config_incidents.lua) |
Doctors, staff, and the jobs of Config.Incidents.LawJobs |
/certificates [name] |
The last death certificates (Config.Autopsy, shared/config_records.lua) |
Doctors, staff, and the jobs of Config.Autopsy.LawJobs (by default the same list as the incidents) |
Config.Incidents.LawJobs is pre-filled with common law job names: sheriff, marshal, police, deputy, vallaw, rholaw, blklaw, strlaw, stdenlaw. Replace them with the job names of your server (the framework job, see Frameworks).
A law or MDT resource can read the records with the server export exports.murphy_doctor:GetIncidents({ victim = charid, attacker = charid, limit = 20 }). See Server exports.
Inventories
murphy_doctor works with the inventory of each supported framework: redemrp_inventory, vorp_inventory and rsg-inventory. Items are registered once at start through your framework (see Items). Another inventory (ox_inventory or a custom one) needs the inventory functions of your framework's server adapter to be edited: see Framework adapters.
HUD, vitals and voice
- murphy_doctor draws its own metabolism HUD (hunger, thirst, temperature, bleeding, poison...). Players move it with
/edithud, show or hide it with/showhudand/hidehud(Config.Metabolism.Commands). - Another HUD can read the values with the client exports (for example
exports.murphy_doctor:GetHunger()), see Client exports. - No voice resource is used or required.
Appearance and vitals scripts
Scripts that save and restore the ped's health should know two rules:
- murphy_doctor does not restore the ped's health when a character loads. That stays with your framework or your vitals script.
- Whenever murphy_doctor deliberately changes the ped's health (treatment, bandage, revive, bleeding, disease), it fires the local client event
murphy_doctor:scriptedHealthChangewith{ reason, from, to, max }. Listen to it so your script does not revert the change:
Other health, death and metabolism scripts
murphy_doctor replaces the framework's death screen and, unless you turn it off, its hunger and thirst. Running two such systems gives two death screens, a respawn timer racing the coma, or two hunger bars.
The install check (server/sv_install_check.lua) warns in the server console about UseDeathHandler = true in vorp_core, vorp_metabolism, vorp_medic and rsg-medic. Other scripts are not detected. See Installation.
- Death, respawn and ambulance scripts: keep only one. A script that revives players must call
exports.murphy_doctor:AuthorizeComaExit(serverId)before its revive. - Hunger and thirst: let murphy_doctor handle them, or set
Config.Metabolism.HungerThirstEnabled = falseand keep yours. - Scripts that damage or teleport the player on purpose can pause the injury detection with
exports.murphy_doctor:SetDamageTrackingEnabled(false)(client). - The cfx
spawnmanagerautomatic respawn is turned off by murphy_doctor when present.
Discord logs
Logging is built in (server/sv_logs.lua): the server posts embeds straight to Discord webhooks. No logging resource is needed or used (murphy_discordlogs is not required). It is set in two files.
The webhook URLs go in server/adapters/webhooks.lua, a server only file:
The switch, the bot name, the colours and the per-type switches stay in shared/config_metabolism.lua:
A log is sent only when all three are true: Enabled, the LogEvents switch of its type, and a non empty DoctorWebhooks URL for its type. Each type can post to its own channel.
Type (DoctorWebhooks / LogEvents) |
Posted on |
|---|---|
coma / Coma |
Coma entry |
revive / Revive |
Getting up after the timer, doctor revive, refused early coma exit, staff heal all |
treatment / Treatment |
Signed treatment report, surgery succeeded or failed, remedy prepared at the bench, medical file updated, death certificate, patient laid in or leaving a bed, outbreak started |
injury / Injury |
Severe injury |
infection / Infection |
New infection, immunity granted (also needs Config.Infection.LogToDiscord = true, the default) |
bandage / Bandage |
Bandage given by a doctor |
billing / Billing |
Invoice issued |
nurse / Nurse |
Nurse NPC heal |
treasury / Treasury |
Withdrawal from the dispensary treasury |
Each embed shows the name and character id of the player concerned, and of the doctor when there is one, with the date in the footer.
Why a separate file: every file of shared/ is also downloaded by the players' game, so a webhook written there could be read and abused by anyone on the server. server/adapters/webhooks.lua never leaves the server.
Coming from 1.0.0: webhooks left in Config.DiscordLogs.Webhooks still work, but the server prints a red warning at start until you move them to server/adapters/webhooks.lua and delete them from the shared config.
Starting and stopping resources while the server runs
- Optional resources can be started or stopped at any time. murphy_interact and murphy_radialmenu are picked up or dropped within a second; the others are checked each time they are needed.
- murphy_doctor itself can be restarted: on stop it saves the health of every connected player and cleans up its props and effects; on start it reloads them. Players in a coma stay in a coma (it is saved in the database).
- Your framework must not be restarted while murphy_doctor runs: restart murphy_doctor after it, as on first start.
Last updated: November 20, 2026