ESX Installation

Install oxide-ems on ESX Legacy — ox_inventory items, disabling esx_ambulancejob, job-table sync, and the ESX compatibility shim.

ESX-specific steps for oxide-ems. Follow Installation first — this page only covers what differs on ESX.

Disable esx_ambulancejob

oxide-ems replaces it entirely. Running both will fight over the death state.

If you start resources one by one in server.cfg, remove or comment out the line:

server.cfg
# ensure esx_ambulancejob

If you start a whole folder (ensure [esx_addons], ensure [core]), the resource starts because it is inside that folder, so removing a line is not enough. Move the folder out:

resources/[esx_addons]/esx_ambulancejob   ->   resources/[disabled]/esx_ambulancejob

Do not add ensure [disabled] to your config. Anything in there stays off.

What oxide-ems takes over on ESX

es_extended only ever detected death — it watches the player, fires esx:onPlayerDeath and sets PlayerData.dead. Everything after that belonged to esx_ambulancejob, so oxide-ems inherits it:

  • the dead phase and its respawn timer
  • the downed screen overlay
  • the hold-E respawn and the hospital teleport
  • the Player(src).state.isDead statebag, which is ESX's documented death contract
  • re-firing esx:onPlayerSpawn (plus esx_basicneeds:resetStatus and playerSpawned) after every revive and respawn, so ESX's own detection re-arms and add-ons like esx_basicneeds reset

ESX has no laststand phase, and oxide-ems does not invent one — a player who dies goes straight to dead, because that is what ESX add-ons key their timing on. The Laststand time setting has no effect on ESX.

Timings live under Field Care → Downed in /ems settings.

Register the items

Open ox_inventory/data/items.lua and paste these into the list. These are the exact names oxide-ems looks for — do not rename them:

-- Oxide EMS
['medical_bag'] = { label = 'Medical Bag', weight = 3000, stack = false, close = true, description = 'A packed EMS bag. Use it to unpack the supplies inside.' },
['medical_bandage'] = { label = 'Medical Bandage', weight = 100, stack = true, close = true, description = 'A sterile bandage used to stop bleeding.' },
['medical_splint'] = { label = 'Splint', weight = 300, stack = true, close = true, description = 'A rigid splint used to set fractures.' },
['medical_surgical_kit'] = { label = 'Surgical Kit', weight = 1500, stack = true, close = true, description = 'A sterile kit required for surgical procedures.' },

oxide-medical needs three cure items as well. If you are installing both (and you should be), add these too:

-- Oxide Medical
['antacid'] = { label = 'Antacid', weight = 100, stack = true, close = true, description = 'Relieves nausea and stomach sickness.' },
['antibiotics'] = { label = 'Antibiotics', weight = 100, stack = true, close = true, description = 'Treats bacterial infections.' },
['antiviral'] = { label = 'Antiviral', weight = 100, stack = true, close = true, description = 'Treats viral infections.' },

Weights, labels and descriptions are sensible defaults — change them to taste. The item names must stay as written. Restart ox_inventory (or the server) after saving.

If your server uses a different inventory, register the same four item names using that resource's syntax.

Items you already have

ox_inventory ships bandage, painkillers, firstaid, ifaks and medikit. oxide-ems re-registers medikit and bandage as usable items with the stock ESX healing amounts — a bandage restores an eighth of maximum health, a medikit heals fully.

medikit is also the default item medics need to revive and stabilize. Change it under Field Care in /ems settings, or enter none there to require no item at all.

If a bag item is missing

Every item in the medical bag's default contents is either registered in the step above or already stock on ESX, so nothing else is needed. The bag also hands over medikit — your first-aid item — which it works out automatically. If your inventory is missing any of them, either add it or remove it from the bag contents under General → Medical bag in /ems settings. Anything the inventory does not recognise is simply skipped, and the medic is told some supplies didn't fit.

Copy the images

Copy every .png from oxide-ems/itemimages/ into:

ox_inventory/web/images/

Set up the EMS job

The department's internal name in /ems admin must match a job in ESX's jobs table — stock ESX ships ambulance, so naming the department ambulance needs no change.

If you want a department with a name that is not in the jobs table, you have two options:

Add it yourself to the jobs and job_grades tables, then restart.

Or let oxide-ems write it. Turn on Framework Compat → ESX → Job table sync → Enabled in /ems settings. oxide-ems will then upsert every department into jobs and every grade into job_grades, and refresh ESX's cache, so xPlayer.job works for your custom names. It syncs on start and whenever a department changes.

This writes to your framework's own tables, so it is off by default — turn it on deliberately.

Two sub-settings worth knowing:

  • Zero framework salary (on by default) writes 0 into the ESX grade salary. oxide-ems pays its own duty salaries, so leaving the ESX salary in place would pay medics twice — once from ESX paychecks, once from EMS duty pay.
  • Job type (ems by default) is written to the jobs.type column, if your schema has one. Schemas without that column are detected and handled.

A department named after a job that already exists updates that job's rows rather than creating a duplicate.

ESX-specific settings

Under Framework Compat → ESX in /ems settings:

SettingDefaultWhat it does
Strip cash on bleedoutOffTakes the player's cash and black money when they bleed out and respawn — the stock esx_ambulancejob behaviour.
Register esx_societyOffRegisters the EMS society with esx_society, for servers running society add-ons alongside this resource.

A note on weapons. Plain ESX keeps weapons in xPlayer.loadout rather than in the inventory, so the generic Lose items on respawn setting cannot see them. The ESX shim handles that case directly:

  • with the setting on Lose weapons only or Lose everything, loadout weapons are removed on a bleedout respawn
  • with it on Keep everything, the loadout is snapshotted and re-added a few seconds after the respawn, because the resurrect wipes it from the ped — this is the same workaround stock ESX used

If you run ox_inventory, weapons are ordinary items and the generic setting covers them; no loadout handling happens.

Restart the whole server

Not restart oxide-ems. The stretcher prop is streamed and needs a full server start to register. See Installation — Restart the whole server.

What the ESX shim keeps working

SurfaceWho uses it
esx_ambulancejob:reviveLegacy medic and admin tools, and o-link's own revive
Player(src).state.isDeadESX's documented death contract, and every add-on reading it
esx:onPlayerSpawn, esx_basicneeds:resetStatus, playerSpawnedRe-fired after every revive and respawn
hospital:server:emergencyAlert / ambulanceAlertRadial menus and police "officer down" relays
txAdmin:events:healedPlayerThe txAdmin heal button
Usable items medikit, bandagePlayers
/revive, /reviveallAdmins

One deliberate improvement over stock: medical items are consumed only when the action finishes, not the moment they are used. Cancelling a bandage no longer eats the bandage.

Verification on ESX

Server starts with no dependency errors, and the console logs the detected death mode as esx.
/ems admin opens; create a department named ambulance with grades and a facility.
Die. Confirm the downed overlay appears with a wait-to-respawn counter, and that G sends a distress signal.
Hold E once available and confirm you respawn at the hospital respawn point.
Confirm esx_basicneeds hunger and thirst reset on respawn — that proves the spawn events are being re-fired.
As an admin, run /revive and confirm you are back on your feet.
Use a medical_bag and confirm the supplies arrive.
If you turned on job sync, check the jobs and job_grades tables for your department.