Skip to main content
The sh-doctorjob resource delivers a complete medical profession for RedM servers. It supports VORP and RSG, server-side patient persistence, configurable downed and respawn flows, item-based treatments, disease and injury tracking, doctor dispatch alerts, NPC fallback services, boss management, society ledger integration, clinic storage, medical supply wagons, crafting stations, payroll, and Discord webhook logging. Version 1.6.1 ships with five clinic locations: Valentine, Rhodes, Strawberry, Blackwater, and Armadillo. The default medical jobs are doctor, doctorR, doctorS, medic, and shaman.
If you use the built-in death handler, disable other death/medic systems. For VORP, set Config.UseDeathHandler = false in vorp_core/config/config.lua. For RSG, remove or stop rsg_medic to avoid conflicting downed and revive states.

Requirements

  • RedM server using fx_version 'cerulean' and game 'rdr3'
  • oxmysql, started before sh-doctorjob
  • One supported framework:
    • VORP
    • RSG / RSG Core
  • MySQL or MariaDB database access for sql/install.sql
  • Framework job and item entries for the doctor jobs and medical items you enable
  • Optional: ox_target for third-eye interactions
  • Optional: sh-society or syn_society for external ledger integration
  • Optional: rsg-inventory or vorp_inventory for framework stash support
The folder/resource should be named sh-doctorjob.

Installation

1

Install dependencies

Install and verify your framework and oxmysql. If you use target interactions, install ox_target.
2

Add the resource

Copy the sh-doctorjob folder into your server resources directory.
3

Import persistence SQL

Run sql/install.sql against your database. This creates patient state and internal ledger tables.
4

Register medical items

For VORP, run sql/items.sql against the framework items table. For RSG, copy the entries from sql/rsgitems.txt into your RSG shared item config.
5

Register jobs

Add the medical jobs you want to use, such as doctor, doctorR, doctorS, medic, and shaman, to your framework job registry with the required grades.
6

Configure server.cfg

Start dependencies before sh-doctorjob.
server.cfg
7

Configure the script

Edit the files in config/ for framework mode, jobs, hospitals, death handling, items, crafting, wagons, storage, webhooks, and integrations.
8

Test the full flow

Assign a test character a doctor job, clock in at a duty station, open /medui, down another test character, submit /alertdoctor, and confirm treatment, revive, respawn, payroll, and ledger behavior.

Framework Support

Set framework detection in config/main.lua:
config/main.lua
The framework bridge handles character identity, jobs, grades, inventories, item removal, money, notifications, stashes, and coordinates. Keep auto unless your server needs a fixed framework mode.

Interaction Modes

sh-doctorjob can use target interactions, native RedM prompt groups, or 3D text prompts.
config/target.lua
Use auto if you want ox_target when available and prompt fallback when it is not.

Supported Jobs

Medical job access is configured in Config.Jobs:
config/main.lua
Doctor alerts and shaman alerts are routed separately:
config/main.lua

Features

The built-in death handler puts players into a downed state, starts a bleedout timer, supports a free-roam downed camera, and can show an optional NUI deathscreen with configurable buttons. Defaults are Config.Death.BleedoutMs = 600000 and Config.Death.ReviveWindowMs = 480000.
Patient state is saved by character in sh_doctor_patients. The system tracks body-region injuries, bleeding, broken bones, cold exposure, heat stroke, and snake bites. Diseases can auto-heal, progress by stage, apply damage or hydration effects, and be cured through configured treatments.
Doctors can open the dashboard with /medui, at configured medical UI stations, or through the doctorfieldkit usable item. The UI shows patient injuries, diseases, and available medical actions.
Items are configured in Config.Items.Catalog. Default treatment items include bandages, splints, antibiotic, antipoison, and cool_rag. Default revive items are syringe and firstaidkit, restricted to doctor/shaman jobs.
Doctors toggle duty at station points or with /docduty. Server validation can require the player to be near a station. On-duty status controls dispatch visibility, restricted actions, payroll, storage access, and NPC fallback checks.
/alertdoctor sends a medical alert to on-duty doctor jobs. /alertshaman routes to configured shaman jobs. Staff can respond with /responddoctor and clear alerts with /cleardoctoralerts.
Static hospital NPC doctors can heal or revive players for a configured price. NPC service can be blocked while doctors are on duty, with an exception for doctor self-service. Optional ledger deposits send service revenue to the clinic ledger.
/sendmedic summons a traveling NPC doctor when Config.NPCRevive.Enabled = true. By default this is blocked when any doctor is on duty. The NPC can charge payment, spawn with a horse, approach the patient, play a revive animation, and leave after a delay.
Managers open /docboss or use boss stations to hire, fire, promote, demote, set grades, and withdraw from the clinic ledger. Payroll pays on-duty staff every Config.Payroll.IntervalMinutes using per-job, per-grade rates.
Clinic storage points use Config.DoctorStorages. Storage can require on-duty status and supports RSG stash IDs, VORP inventory IDs, max weight, slots, job, and minimum grade.
Doctor crafting is configured in config/crafting.lua. Default recipes create bandages, splints, and firstaidkit, and can require doctor job, duty state, station proximity, job allowlists, blocked jobs, and minimum grades.
Hospitals can define wagonStation spawn points. Default wagon types are wagondoc01x with storage and buggy02 without storage. Wagon stash IDs can be personal per character or shared by wagon type.
Config.Logging can log revives, treatments, admin commands, boss actions, duty toggles, alerts, and wagon events to per-channel Discord webhooks or a default webhook.

Hospitals

Clinic locations are configured in config/hospitals.lua. The resource includes these default hospital IDs: Example hospital entry:
config/hospitals.lua

Commands

Set a command to nil in config to disable it where supported.

Keybind Defaults

config/main.lua

Items

Config.Items.RegisterAsUsable = true lets the script register framework usable item handlers automatically. Medical item use runs a server precheck, optional client animation/progress UI, final server validation, item consumption, and treatment application.

Death Handling

Core settings live in config/death.lua:
config/death.lua
Enable the optional NUI deathscreen with:
config/death.lua
The deathscreen buttons are configurable and can call built-in actions such as request_help and respawn, or run custom commands with executeCommand.

Diseases And Injuries

Disease definitions live in config/diseases.lua. Tracked body regions are head, chest, abdomen, leftArm, rightArm, leftLeg, and rightLeg.

Boss, Ledger, And Society Integration

Boss access is controlled by Config.Management:
config/main.lua
Ledger provider is configured in config/integration.lua:
config/integration.lua
Use internal to store balances in sh_doctor_ledger and sh_doctor_ledger_tx.

Payroll

Payroll pays on-duty doctors at a fixed interval:
config/main.lua
Add matching entries for every job you want paid.

Storage

Clinic storage is configured with Config.DoctorStorage and Config.DoctorStorages.
config/main.lua
Each storage point supports id, label, job, minGrade, pedModel, pedCoords, rsgStashId, rsgStashSize, and vorpInvId.

Crafting

Doctor crafting can require doctor job, duty state, and station proximity:
config/crafting.lua
Default recipes create bandages, splints, and firstaidkit. Recipe-level restrictions can use allowedJobs, blockedJobs, minGrade, and minGradeByJob.

Wagons

Medical carts are configured in config/wagons.lua:
config/wagons.lua
When Personal = true, wagon storage persists per character.

NPC Services

Static hospital NPCs are configured per hospital. Global NPC settings include:
config/main.lua
NPC dispatch revive is separate:
config/main.lua

Admin Access

Admin commands use Config.Admin:
config/main.lua
ACE example:
server.cfg

External Revive And Respawn

Use the built-in compatibility events/exports when another resource revives or respawns a player. Server events:
Client events:
You can also register third-party alias events in Config.Integration.ExternalRevive and Config.Integration.ExternalRespawn. Respawn payloads may include hospitalId, hospital, or direct coords/spawn data. If no location is provided, the script falls back to the nearest hospital.

Exports

Server exports:
Client exports:

Database Tables

sql/install.sql creates: sql/items.sql contains VORP item inserts. sql/rsgitems.txt contains RSG shared item definitions.

Localization

Set the active locale in config/main.lua:
config/main.lua
Editable language files are included in locales/en.lua, locales/es.lua, and locales/de.lua.

Discord Webhooks

Configure webhook logging in Config.Logging:
config/main.lua
Leave a channel URL empty to disable that channel or fall back to the default where supported.

Troubleshooting