Oxide Medical
Persistent injuries, illnesses, vitals, and medical records — the multi-framework medical layer for FiveM servers.
oxide-medical is the medical layer for a FiveM roleplay server: the system that decides what is actually wrong with a player, and keeps it wrong until somebody treats it.
Every character gets a persistent medical record — blood type, DNA, an immune stat, and a live list of conditions. Getting shot, stabbed, mauled, blown up or thrown off a building produces specific injuries chosen from what hit you and where it landed: a broken leg that makes you limp, a laceration that bleeds on the ground, a retained bullet only a surgeon can extract. Getting rained on, going hungry, or standing next to somebody with the flu produces illnesses that get worse over hours and spread to other people. On top of it all sits a vitals simulation — pulse, blood pressure, blood oxygen — driven by a blood-volume model, where enough blood loss collapses the pulse into cardiac arrest.
The player is never told what is wrong with them. They are told their chest aches, their vision swims, their limbs feel heavy. Diagnosing it is somebody else's job, which is the point: oxide-medical is what gives an EMS department real work to do.
oxide-medical is framework-agnostic through o-link and runs on QBCore, ESX and Qbox. It has no UI of its own — it is a system layer, exposed through exports, statebags and events for other resources to build on. It pairs with oxide-ems, the EMS job that examines patients, operates on them, and treats the medic-only conditions.
Key Features
- Persistent Medical Records — Blood type, DNA hash, immune stat (0–100), allergies, post-cure immunity windows and chronic conditions per character, backed by MySQL
- Four Condition Categories — Editable catalogs for fractures (13 types), wounds (gunshot, laceration, retained bullet), diseases (influenza, wound infection, pneumonia, hepatitis) and sicknesses (nausea, fever, dizziness, dehydration, food poisoning, cardiac arrest)
- Damage Classification — 96 weapons and damage sources mapped to twelve classes, 56 ped bones mapped to fifteen body parts, with fracture rules driven by class and damage amount; repeat hits escalate the existing injury instead of stacking duplicates, and bullet-class hits roll separately for a retained bullet
- Physical Effects — Limp clipset, movement penalty, aim sway while shooting, and throttled blood decals under a bleeding player, all driven off the condition list
- Symptom Effects — Continuous camera shake for dizziness and lightheadedness, periodic coughing and vomiting animations, mapped from symptom tokens you can extend without touching code
- Vitals Engine — Pulse, blood pressure and blood oxygen recalculated every couple of seconds from active conditions plus an in-memory blood-volume accumulator, published quantized and change-only so idle players cost nothing
- Cardiac Arrest — A pulse that stays collapsed for several ticks adds a critical condition and drops the player where they stand, cleared on revive and swept if it survives a crash
- Disease Progression & Contagion — Timed stages raise severity and swap symptoms as real time passes (severity never regresses); proximity contagion is server re-validated for distance, disease and immunity, with masks on either party cutting the chance
- Environmental & Needs-Driven Illness — Rain exposure detected through game natives with no weather-resource dependency, dirty wounds turning septic, an immune stat that erodes under sustained neglect and regenerates when healthy, and deterministic dehydration mirroring the thirst stat with hysteresis
- Vague Symptom Notifications — The player is never told the diagnosis; per-body-region and per-symptom message pools in config
- Self-Treatment & Medic-Only Care — Usable cure items with a progress bar, server-validated on completion; medic-only conditions are refused and left to the EMS pipeline
- Damage Over Time — Severe untreated conditions drain health, applied client-side so reaching zero routes through the server's normal death handling
- Godmode Suspension — Automatic suspension for players in godmode, with no dependency on the resource that sets it, plus explicit exempt controls
- Blood-Evidence Handoff — Non-firearm bleeds carry the character's DNA so a police resource can create forensic evidence without duplicating firearm blood drops
- Developer Surface — Fifteen server exports, two client exports, an
o-linkmedicalnamespace, two replicated statebags and four condition-change events - Admin Toolkit —
/medwith fifteen subcommands including eleven scenario simulations, and a built-in self-test that exercises the whole export surface and reports pass/fail per check
Requirements
Required
| Resource | Purpose |
|---|---|
ox_lib | Shared library |
oxmysql | Database persistence |
o-link | Framework abstraction (character, inventory, notify, progress bar, death, needs, logging) |
| Framework | One of qb-core, qbx_core, or es_extended |
Recommended
| Resource | Purpose |
|---|---|
oxide-ems | Recommended. The EMS job that acts on the record — examines patients, operates on them, and treats the medic-only conditions |
oxide-police | Optional. Consumes the blood-evidence event and turns it into DNA-linked forensic evidence |
oxide-needs | Optional. Pushes hunger/thirst/stress changes directly. Without it, the same values are read from character metadata through o-link on a poll |
Supported Frameworks
| Framework | Support |
|---|---|
QBCore (qb-core) | Full |
QBX (qbx_core) | Full |
ESX Legacy (es_extended) | Full |
Quick Start
Place oxide-medical in your server's resources directory.
Start ox_lib, oxmysql, o-link, oxide-medical, and then the recommended oxide-ems, in that order.
Run sql/install.sql to create the medical_records and medical_conditions tables.
Register the cure items (antacid, antibiotics, antiviral, plus the shared medical_bandage and medical_splint) following the framework-specific setup (QBCore, QBX, or ESX).
Review shared/config.lua and the catalog files under shared/config/ — the one setting most servers should look at first is Config.Damage.
Make sure your admins have the admin permission, then run /med test in-game to self-test the whole install.
See the Installation Guide for the full setup flow.
Documentation
Installation
Generic install hub.
Configuration
Per-setting reference for shipped config.
QBCore Setup
QBCore-specific install.
QBX Setup
Qbox-specific install.
ESX Setup
ESX Legacy install.
Features
Feature-by-feature reference.
Exports & Integration
Exports, statebags, and events.
Admin Tools
The /med command and self-test.
Troubleshooting
Common issues and fixes.