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. Staying out in the cold brings on hypothermia, and breathing a fire's smoke brings on smoke inhalation. 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, hypothermia, smoke inhalation)
- 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 checked through the
o-linkweather bridge with a fallback to the game's own weather, so no weather resource is required, 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 - Hypothermia — Off by default. With a weather resource that reports temperature and cover through
o-link, such asoxide-weather, players left uncovered in the cold start shivering and pick up ahypothermiasickness that clears once they have been warm for a while. Tuned by the database-backedWeatherIntegrationsetting - Smoke Inhalation — A resource that sees a player breathing smoke, such as a fire resource, reports the dose through
ReportExposure. The condition follows it from a cough through shortness of breath, dizziness and weakness to failing to breathe, costing health and blood oxygen as it worsens, and clears in clean air or at once with a medic's treatment. Without a resource that reports smoke, it never happens - 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 — Sixteen 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, weather, 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 |
oxide-weather | Optional. Reports temperature and cover through o-link, which hypothermia needs and rain exposure asks first. Without a weather resource, hypothermia stays off and rain falls back to the game's own weather |
| A resource that reports smoke, such as a fire resource | Optional. Reports players breathing smoke through ReportExposure, which becomes smoke inhalation. Without one, smoke inhalation never happens |
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.
Register the cure items (antacid, antibiotics, antiviral, plus the shared medical_bandage and medical_splint, and confirm the stock painkillers is present) 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. Everything is file-based except the hypothermia tuning in shared/config/weather.lua, which moves into the oxide_settings table on first start.
Make sure your admins have the admin permission, then run /med test in-game to self-test the whole install.
The medical_records and medical_conditions tables are created automatically the first time oxide-medical starts. The database user needs permission to create tables.
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.