Admin Guide
The /med admin command — reading and changing medical state, eleven scenario simulations, and the built-in self-test.
oxide-medical has one command, /med, with fifteen subcommands. There is no admin panel — everything is done from chat or the server console.
Who Counts as an Admin
A player is an admin if they are in a server group that has the admin permission. There is one level, and it works identically on QBCore, ESX and Qbox.
add_principal identifier.license:abc123 group.admin
add_ace group.admin admin allowThe server console always passes the check. Console callers must pass an explicit player id — me only works in-game.
Every subcommand that changes persistent state (add, treat, remove, clear, immune, give, sim, vitals) is written to the log with the admin who ran it and the arguments they used.
/med appears in chat autocomplete with all fifteen subcommands and their arguments. Typing /med on its own (or with an unknown subcommand) prints the usage line; from the server console it prints the full subcommand list.
Reading State
/med record <id|me>
The full picture for one player: blood type, DNA hash, immune stat, and every active condition with its id, category, type, body part, severity and expiry.
This is the first thing to run for any "something is wrong with my character" report.
/med list <id|me>
Just the condition list, without the record header.
/med blood <id|me>
That player's blood type.
/med types [category]
Lists every configured catalog entry. With no argument it dumps all four categories; with fracture, wound, disease or sickness it dumps just that one.
Use this to find the exact type name to pass to /med add.
/med vitals <id|me>
Current published vitals plus the internal state behind them:
player 3 vitals: HR 118 bpm (rising) | BP 88/58 | SpO2 91%
internals: volume=42.5 arrestTicks=0 bleedTier=3volume is blood volume 0–100, arrestTicks counts consecutive ticks below the arrest threshold, and bleedTier is the current bleeding tier feeding the drain.
If it says no vitals published yet, the first tick has not run — wait a couple of seconds.
Changing State
/med add <id|me> <category> <type> [bodypart|-] [severity] [expiresSec]
Gives a player a condition.
- category —
fracture,disease,sicknessorwound - type — a catalog entry (
/med typeslists them). A type not in the catalog is still added, with a note — useful for testing custom entries. - bodypart — one of the fifteen body parts, or
-for none - severity — 1 minor, 2 moderate, 3 severe, 4 critical. Defaults to minor.
- expiresSec — seconds until it clears on its own. Omit for permanent.
/med add 3 fracture broken_leg_left LLEG 3
/med add me disease flu - 1
/med add 3 sickness nausea - 1 300/med treat <id|me> <conditionId|type>
Marks a condition treated — the same path a medic's treatment takes, so a disease cure here also grants the immunity window. Accepts a numeric id from /med record, or a type name.
/med remove <id|me> <conditionId|type>
Deletes a condition outright. Unlike treat, this leaves no treatment record and grants no immunity — use it for cleaning up test state.
/med clear <id|me>
Removes every active condition from a player.
/med immune <id|me> [0-100]
With no value, prints the current immune stat. With one, sets it.
Immunity gates every illness roll, so setting it to 0 is how you make infection and sickness tests land reliably.
/med vitals <id|me> volume <0-100>
Sets blood volume directly. Dropping somebody to 10 is the fastest way to watch a pulse collapse.
/med vitals <id|me> reset
Resets the whole vitals accumulator for that player.
/med give <id|me> <item> [count]
Hands over an item — normally a cure, so you can test the self-treatment flow without a shop.
/med notify <id|me>
Forces a vague notification about that player's worst active condition immediately, bypassing the throttle. Use it to preview your notification wording after editing shared/config/notifications.lua.
/med checkneeds <id|me>
Prints the player's current hunger, thirst and stress, then runs the needs-sickness rules and the dehydration sync against them right now, instead of waiting for the next scheduled evaluation.
Simulations — /med sim <scenario> [id|me]
Eleven scenarios that set up a situation end to end, so you can check a feature without arranging it by hand.
| Scenario | What it does |
|---|---|
fracture | Adds a severe broken left leg and a moderate broken left arm. Expect: a limp, slowed movement, and aim drift while shooting. |
symptoms | Adds moderate flu and nausea. Expect: periodic coughing, vomiting, and screen sway. |
needs | Drops hunger, thirst and stress to danger levels, zeroes immunity, then runs the needs rules up to 25 times and reports which sickness fired. |
bleed | Adds a moderate laceration to the left leg from a cutting hit. Expect: blood decals, health draining, and a blood-evidence event. |
infection | Adds a critical wound infection. Expect: 3 HP per tick draining until cured with antibiotics. |
contagious | Adds stage-1 influenza. Stand near other players to watch it spread. |
progress | Adds influenza and immediately advances it one stage. Check /med record for the raised severity and new symptoms. |
arrest | Adds a severe chest gunshot and drops blood volume to 10. Expect: the pulse to collapse, cardiac arrest to fire, and the player to go down within about 30 seconds. |
down | Downs the player. Expect: triggers and effects to pause. |
revive | Revives the player. |
reset | Clears every condition, restores immunity, resets vitals, and restores needs. The cleanup for all of the above. |
Every scenario runs through o-link, so they all work on any framework. down and revive report an error if no death provider is installed at all; needs sets stress on frameworks that have it (ESX does not, so the stress half is a no-op there).
Always finish a testing session with /med sim reset, or you will leave yourself carrying whatever you were testing.
The Self-Test — /med test <id|me>
An automated functional test of the entire export surface, run against a live player. It creates conditions, reads them back, treats them, expires them, checks the offline read path, exercises the vitals engine and cardiac arrest, then cleans up everything it created.
Results print per check to the server console:
[oxide-medical][test] PASS GetRecord returns a record
[oxide-medical][test] PASS AddCondition returns an id
[oxide-medical][test] FAIL vitals recover after arrest cleared — 0
[oxide-medical][test] === medical self-test: 53/54 passed, 1 failed ===Failures are also logged as warnings and sent to the admin who ran it.
Run this after installing, after upgrading, and after changing anything in shared/config/. It is the fastest way to confirm the system is working.
What it cannot check: anything visual. The limp, the aim sway, the screen shake, the blood decals and the notification wording all have to be checked by eye — the /med sim scenarios above are for exactly that.
The player being tested must already have a record loaded, so have them spawn in first.
Typical Tasks
"A player says their character is permanently injured."
/med record <id>Look for a condition with no expiry that they cannot self-treat. If it should not be there, /med remove <id> <conditionId>.
"Somebody is stuck in cardiac arrest."
Cardiac arrest clears on revive. If it has survived a crash and they are up and walking, it is swept automatically on their next login. To clear it immediately:
/med remove <id> cardiac_arrest"I want to see what a badly hurt patient looks like on the EMS monitor."
/med sim arrest <id>"I changed the notification lines and want to check them."
/med add me fracture fractured_ribs UPPER_BODY 2
/med notify me"Illness never seems to happen."
Immunity is gating it. Set it to 0 and try again:
/med immune <id> 0
/med checkneeds <id>"I want a clean slate."
/med sim reset <id>