RedM documentation
Murphy's Doctor
Getting Started
Frameworks
murphy_doctor runs on three frameworks with the same features: REDEM:RP 2023, VORP Core and RSG-Core. Everything that depends on the framework (characters, jobs, money, items, death flag) goes through a small adapter, one per framework, in server/adapters/ and client/adapters/. This page explains what each adapter does on your server. To adapt the script to another framework, see Framework adapters.
Detection
Config.framework in shared/config.lua picks the framework:
| Value (case does not matter) | Framework |
|---|---|
"auto" (default) |
The first resource found started among redem_roleplay, vorp_core, rsg-core, in that order |
"REDEMRP2k23", "redemrp", "redem", "redem_roleplay" |
REDEM:RP 2023 |
"vorp", "vorp_core", "vorpcore" |
VORP |
"rsg", "rsg-core", "rsgcore" |
RSG-Core |
The detection runs once, when murphy_doctor starts (shared/framework.lua), on the server and on each client. Your framework must therefore be started before murphy_doctor. If nothing is found, the console prints NO SUPPORTED FRAMEWORK DETECTED and no adapter loads. An unknown value prints a message and falls back to the automatic detection.
The resolved framework is stored in Config.FrameworkResolved ("REDEMRP2k23", "vorp" or "rsg"). Each adapter file starts with a check on that value, so only one adapter is active.
Overview
| - | REDEM:RP 2023 | VORP | RSG-Core |
|---|---|---|---|
| Core resource | redem_roleplay |
vorp_core |
rsg-core (with ox_lib) |
| Inventory | redemrp_inventory |
vorp_inventory |
rsg-inventory |
| Resources to stop | redemrp_respawn, redemrp_status |
vorp_medic, vorp_metabolism |
rsg-medic |
| Framework setting to change | none | UseDeathHandler = false in vorp_core/config/config.lua |
none |
| Character id stored | citizenid |
charIdentifier |
citizenid |
| Staff group | character group |
account group, then character group | permissions (ACE) |
| Job | character job |
character job |
job.name |
| On-duty flag | no | no | job.onduty |
| Money | money |
currency 0 (dollars) |
cash account |
| Item metadata read from | meta |
metadata |
info |
| Framework dead flag kept in sync | none | character isdead |
metadata isdead |
"framework" notification style |
redem_roleplay:NotifyLeft |
DisplayLeftNotification |
ox_lib notify |
Tested versions noted in the adapters: vorp_core 3.3 with vorp_inventory 4.5 or newer, rsg-core 2.3.10 with rsg-inventory 2.8.4.
Characters
Every row the script stores is keyed by the character id, never by the player license (see Database). A player switching characters therefore gets the health, coma, duty and doctor membership of the new character.
| Framework | Id | Name | Character switch |
|---|---|---|---|
| REDEM:RP | citizenid |
firstname / lastname |
The id is kept for the whole connection: switching character needs a reconnect, as on stock REDEM:RP |
| VORP | charIdentifier (stored as text) |
firstname / lastname of the used character |
Supported: the id is refreshed on vorp:SelectedCharacter |
| RSG | citizenid |
charinfo.firstname / charinfo.lastname |
Supported: the id is refreshed on RSGCore:Server:OnPlayerLoaded |
When a character enters the world, the client adapter tells the script so it can load that character's health and restore a coma saved before a disconnect:
| Framework | Signal used |
|---|---|
| REDEM:RP | playerSpawned, fired by the character selection |
| VORP | vorp:SelectedCharacter |
| RSG | RSGCore:Client:OnPlayerLoaded |
murphy_doctor does not restore the ped's health when a character loads: that stays with your framework.
Jobs and doctor detection
Who counts as a doctor is set by Config.Interactions.DoctorDetection (see Installation). Only the "job" mode, and the "both" / "any" combinations, read the framework job.
In job mode, a player is a doctor when their job name is listed in Config.DoctorJobs (default doctor, medecin, physician, medic; the comparison ignores case). The job grade is not used: every grade of a doctor job is a doctor. Rank and chief status inside a dispensary come from the dispensary roster, not from the job.
| Framework | Job read | Notes |
|---|---|---|
| REDEM:RP | job of the character |
Give the job with your usual REDEM:RP tool |
| VORP | job of the used character |
Give the job with your usual VORP tool (for example the admin menu or /setjob) |
| RSG | PlayerData.job.name |
The stock RSG medical job, medic, is in the default Config.DoctorJobs: it works as is |
On-duty restriction
Config.Interactions.DoctorJobRequireDuty = true makes job mode count only doctors whose framework job is on duty. It only works where the framework has an on-duty flag:
| Framework | Effect |
|---|---|
| RSG | Works with job.onduty |
| REDEM:RP | No flag: ignored, and the console prints DoctorJobRequireDuty=true but framework 'REDEMRP2k23' has no on-duty flag |
| VORP | No flag: ignored |
This is separate from murphy_doctor's own duty clock (Config.Duty, see Duty), which works on every framework.
Doctor specialisation of murphy_craft
With Config.Interactions.DoctorSpeFromCraft = true and murphy_craft running, a player who chose the doctor specialisation is also a doctor, on any framework. See Integrations.
Staff groups
Staff commands (doc_addchief, doc_selftest, doc_healall, /doc:disease...) are allowed to the server console and to players whose group is listed in Config.AdminGroups (default { "admin", "superadmin" }). Each framework reports that group differently:
| Framework | Group returned |
|---|---|
| REDEM:RP | The character group |
| VORP | The account group (users.group) when it is listed in Config.AdminGroups, otherwise the character group. VORP keeps staff ranks on the account, the character group is usually user |
| RSG | RSG has no group. The script tests RSGCore.Functions.HasPermission for each entry of Config.AdminGroups, then for god and admin, and returns the first match. If none matches but the player has the command ACE (stock RSG server.cfg: group.admin / rsgcore.god), the player is treated as admin (or the first entry of Config.AdminGroups when admin is not listed). Otherwise user |
On RSG, if your staff only holds the god permission, add "god" to Config.AdminGroups.
Commands registered as restricted (such as doc_addchief, doc_adddoctor, doc_wipedispensary, doc_reloadhealth) also need the ACE permission for the command in game. See Commands and keybinds.
Money
All money moves through the player's cash:
| Framework | Account |
|---|---|
| REDEM:RP | money (addMoney / removeMoney) |
| VORP | Currency 0, dollars (addCurrency / removeCurrency) |
| RSG | cash (AddMoney / RemoveMoney, reason murphy_doctor) |
A payment is refused when the player cannot afford it. Where the script moves money:
- Invoices: the patient pays in cash. The amount goes to the dispensary treasury when it is enabled, otherwise to the doctor who issued it. See Billing.
- Nurse NPC: the heal fee is taken in cash. See Nurse.
- Treasury withdrawals and duty pay: paid out in cash. See Duty.
The dispensary treasury is stored by murphy_doctor itself (Database), not in a framework society or bank account. Gold is never used.
Inventory
The script never creates items: it uses the items of your inventory by name. The seeds to add them are in install/, see Items.
| - | REDEM:RP | VORP | RSG |
|---|---|---|---|
| Usable item registration | Local event RegisterUsableItem:<name> of redemrp_inventory |
exports.vorp_inventory:registerUsableItem |
RSGCore.Functions.CreateUseableItem |
| Items given / removed with | redemrp_inventory item object (AddItem / RemoveItem) |
exports.vorp_inventory:addItem / subItem |
exports['rsg-inventory']:AddItem / RemoveItem |
| Item labels from | exports.redemrp_inventory:GetItemsList() |
exports.vorp_inventory:getItemDB(name) |
RSGCore.Shared.Items |
| Item images shown in the interface | nui://redemrp_inventory/html/ + the item imgsrc |
nui://vorp_inventory/html/img/items/<name>.png (or the image metadata) |
nui://rsg-inventory/html/images/ + the item image |
| Inventory closed with | redemrp_inventory:closeinv |
vorp_inventory:CloseInv |
exports['rsg-inventory']:CloseInventory |
Usable flags must be set in the inventory: canBeUsed = true (REDEM:RP), usable = 1 (VORP), useable = true (RSG). The seeds in install/ already set them.
Metadata
The only metadata the script writes is the poison mark on a poisoned item (Config.Poison.MetadataKey, "poison" by default). A poisoned item becomes its own stack; when it is used, that exact stack is removed.
- REDEM:RP: the stack is matched by its
meta. After that removal the inventory is resent to the player, becauseredemrp_inventorydoes not push it by itself. Adescriptiongiven in metadata is stored asrename, the REDEM:RP field for a custom item name. - VORP: an empty metadata table is never passed to
vorp_inventory(it would only match stacks without metadata). Item counts include every stack. - RSG: the slot holding the matching poison payload is found and removed from that slot.
VORP: optional Config.Items
On VORP the adapter reads an optional Config.Items table (not defined by default) placed in any file of shared/:
Its label wins over the label of the VORP items table. VORP has no bulk item list, so doc_selftest checks each configured item name in Config.Items first, then in the vorp_inventory items table: a missing item is reported as [WARN] items not in your inventory: ....
Death handling
murphy_doctor replaces the framework's death screen. A player who goes down enters a coma: coma screen, help call to doctors, doctor revive, or getting up when the coma timer ends. The adapter keeps the framework informed so that other scripts (jail, HUD, anti combat log) still see the player as down.
| Framework | What the script does | Revives from other scripts it recognises |
|---|---|---|
| REDEM:RP | No framework flag exists: the coma is the reference. The player is revived in place by the script itself, and redemrp_respawn:client:Revived is still fired for other listeners |
redemrp_respawn:client:Revived (if the ped is still dead, the script revives it) |
| VORP | Keeps the character's isdead flag in sync (through vorp:ImDead) |
vorp_core:Server:OnPlayerRevive (admin revive, allowed through the coma exit check), vorp_core:Client:OnPlayerRevive, vorp:resurrectPlayer |
| RSG | Keeps the isdead metadata in sync |
rsg-adminmenu:server:playerrevive (checked against the admin's permission, allowed through the coma exit check), rsg-medic:client:playerRevive, rsg-medic:client:adminRevive |
When the coma timer ends, the player gets up where they lie: there is no teleport to a hospital.
Any other script that revives players must call exports.murphy_doctor:AuthorizeComaExit(serverId) before its revive. Otherwise the server refuses an exit before the coma timer ends (Config.Coma.ServerExitCheck = true, see Coma) and the player falls back into the coma at the next login.
The cfx spawnmanager automatic respawn, when present, is turned off by the script so it does not revive a player in a coma.
Notifications
With Config.NotifyStyle = "framework", notifications use the framework's own system:
| Framework | System |
|---|---|
| REDEM:RP | Event redem_roleplay:NotifyLeft |
| VORP | exports.vorp_core:DisplayLeftNotification (the game's notification on very old cores) |
| RSG | ox_lib:notify |
The other styles are described on Notifications.
Deleted characters
With Config.CleanDeletedCharacters = true (default), the rows of characters that no longer exist are removed one minute after each start. The framework's character table is read for that:
| Framework | Table and column read |
|---|---|
| REDEM:RP | characters.citizenid |
| VORP | characters.charidentifier |
| RSG | players.citizenid |
Nothing is removed when that table cannot be read or is empty. See Database.
Known caveats
- Start order: the framework must be started before murphy_doctor, otherwise the automatic detection finds nothing.
- REDEM:RP: if
redemrp_respawnis left running, its death screen and murphy_doctor's coma screen overlap. Stop it. - VORP:
UseDeathHandler = truegives two death screens and a respawn timer racing the coma. The install check reports it. - VORP:
vorp_medicregisters its ownbandageand revive items; left running, they heal around murphy_doctor's wounds. Stop it. - RSG: staff is read from permissions, see Staff groups.
- Law jobs:
/incidentsand/certificatesare allowed to the jobs ofConfig.Incidents.LawJobs, pre-filled with common names (sheriff,marshal,police,deputy,vallaw,rholaw,blklaw,strlaw,stdenlaw). Adjust it to your server's law jobs. See Integrations. - Other inventories (ox_inventory or a custom one) are not supported out of the box. Edit the inventory functions of your framework's server adapter, see Framework adapters.
Last updated: November 20, 2026