QBCore Installation

Install oxide-medical on QBCore — cure item registration in qb-core, item images, needs polling, and death integration.

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

Nothing to Disable

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

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

Register the Cure Items

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

-- Oxide Medical
['antacid']     = { name = 'antacid',     label = 'Antacid',     weight = 100, type = 'item', image = 'antacid.png',     unique = false, useable = true, shouldClose = true, description = 'Relieves nausea and stomach sickness.' },
['antibiotics'] = { name = 'antibiotics', label = 'Antibiotics', weight = 100, type = 'item', image = 'antibiotics.png', unique = false, useable = true, shouldClose = true, description = 'Treats bacterial infections.' },
['antiviral']   = { name = 'antiviral',   label = 'Antiviral',   weight = 100, type = 'item', image = 'antiviral.png',   unique = false, useable = true, shouldClose = 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'] = { name = 'medical_bandage', label = 'Medical Bandage', weight = 100, type = 'item', image = 'medical_bandage.png', unique = false, useable = true, shouldClose = true, description = 'A sterile bandage used to stop bleeding.' },
['medical_splint']  = { name = 'medical_splint',  label = 'Splint',          weight = 300, type = 'item', image = 'medical_splint.png',  unique = false, useable = true, shouldClose = true, description = 'A rigid splint used to set fractures.' },

useable = true matters. oxide-medical registers each cure as a usable item, and an item that is not marked usable can never be used to treat anything.

Weights, labels and descriptions are sensible defaults — change them to taste. The item names must stay as written.

The item you already have

QBCore ships painkillers, which is 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:

qb-inventory/html/images/

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

Needs Integration

QBCore keeps hunger, thirst and stress in player metadata, and o-link reads all three. That means the needs-driven parts of oxide-medical work out of the box:

  • going hungry can bring on nausea
  • sustained stress can bring on dizziness
  • neglect erodes the immune stat; looking after yourself regenerates it
  • low thirst brings on dehydration, which clears when you drink

Those values 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 QBCore means the inlaststand and isdead metadata. While a player is either, no new injuries register, no illness rolls happen, damage over time pauses, and physical effects clear.

Stock qb-core has no death lifecycle of its own — qb-ambulancejob maintained that metadata, and if you have replaced it with oxide-ems, that keeps it accurate instead. Either way this works; it only stops working if you remove the ambulance job and put nothing in its place.

Verification on QBCore

  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 — should print your real hunger, thirst and stress values, not nil.
  6. /med sim reset to clean up.