ESX Installation

Install oxide-medical on ESX Legacy — ox_inventory item registration, the missing stress stat, and death integration.

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

Nothing to Disable

oxide-medical does not replace anything ESX ships. It adds a layer ESX has no equivalent of.

If you are also installing oxide-ems, that one does replace esx_ambulancejob — see its own ESX guide for that step.

Register the Cure Items

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

-- 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.' },

The fracture and wound catalogs also name two supply items. If you are installing oxide-ems alongside this, you will be adding them for it anyway — otherwise add them here:

-- Medical supplies (shared with oxide-ems)
['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.' },

Restart ox_inventory (or the server) after saving.

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

The item you already have

ox_inventory ships painkillers, the cure for fever. Nothing to add — but check no other resource has already claimed it as a usable item, or the two will conflict.

Copy the Images

Copy the .png files into:

ox_inventory/web/images/

Images for all five items ship in oxide-ems/itemimages/, since the two resources are distributed together.

Needs Integration — Read This One

ESX stores hunger and thirst in esx_status, on a 0–1,000,000 scale. o-link normalises them to 0–100, so oxide-medical reads them correctly with nothing to configure. Going hungry can bring on nausea, neglect erodes the immune stat, and low thirst brings on dehydration that clears when the player drinks.

ESX has no stress stat. o-link reports stress as 0 on ESX, which means the shipped stress rule — dizziness at 80 or above — can never fire there. Everything else in the needs layer works normally.

If your server runs a stress system of its own, either point a custom rule at whatever it exposes, or drop the stress rule from Config.NeedsSicknessRules in shared/config/sickness.lua so it is not misleading:

Config.NeedsSicknessRules = {
    { need = 'hunger', op = '<=', value = 15, sickness = 'nausea', baseChance = 0.40 },
    -- stress rule removed: ESX has no stress stat
}

Needs are read on a poll — every 30 seconds, with the sickness rules rolling every fourth read. See Config.Triggers.NeedsPolling in Configuration.

Death Integration

oxide-medical reads downed and dead state through o-link, which on ESX means the isDead player statebag. While a player is dead, no new injuries register, no illness rolls happen, damage over time pauses, and physical effects clear.

ESX has no downed or laststand phase — a player is alive or dead, nothing in between. That is ESX's own model, and oxide-medical follows it.

Stock es_extended only detects death; esx_ambulancejob maintained the state around it. If you have replaced that with oxide-ems, it publishes the isDead statebag and this works. It only stops working if you remove the ambulance job and put nothing in its place.

Verification on ESX

  1. Server starts with no dependency errors.
  2. /med test as an admin — every check should pass.
  3. /med sim fracture — you should limp and your aim should drift.
  4. /med add me disease infection - 1, then /med give me antibiotics and use it. A progress bar should run and the infection should clear.
  5. /med checkneeds me — hunger and thirst should show real values. Stress showing 0 is expected on ESX.
  6. /med sim reset to clean up.