XS-Medical
EMS and medical for Qbox and QBCore. Wounds on every body part, a medic tablet with a live monitor, hospitals you build in game and NPC pharmacists. It replaces qbx_medical, qbx_ambulancejob and qb-ambulancejob.
Requirements
ox_libandoxmysql- Qbox (
qbx_core) or QBCore (qb-core)
Everything else is found on its own: ox_inventory, qb-inventory, qs-inventory, ps-inventory, codem-inventory or core_inventory; ox_target, qb-target, sleepless_interact, interact or qtarget (or E prompts without one); and your dispatch, vehicle keys, fuel and banking scripts.
This is a beta. Everything is in, and it needs testing on real servers. If something breaks or feels wrong, tell me on Discord.
Installation
- Stop
qbx_medical,qbx_ambulancejoborqb-ambulancejoband take them out ofserver.cfg. XS-Medical answers for all three, so running both would fight over every death. - Drop
XS-Medicalinto your resources and addensure XS-Medicalafterox_libandoxmysql. - Paste
items/ox_inventory.luaintoox_inventory/data/items.lua, oritems/qb_core.luaintoqb-core/shared/items.lua. Replace any entries with the same name. - Copy
inventory_images/*.pnginto your inventory's image folder. - Give your staff the builder:
add_ace group.admin xs.medical.admin allow. - Restart, then run
/medicalbuilderin game and build your first hospital.
The tables are made on first start. sql/xs_medical.sql is there if you would rather run it yourself.
Medics are anyone with a job named ambulance, ems or doctor, or a job of type ems. Change that in Config.Jobs.
Building a hospital
/medicalbuilder opens the builder. Make a hospital, name it, and add points. Each point is placed with a free camera: fly to the spot and press Enter, or use At my spot.
- Check-in: a nurse or a desk where patients check themselves in.
- Beds: aim at a bed in your map and press F to snap to it. Give each a room name, and optionally a bedside monitor.
- Operating tables for surgery.
- Storage, lockers (every medic's own) and supply cabinets.
- Duty clocks and management for bosses.
- Garages and helipads: pick the vehicles from your vehicles list and set where they spawn.
- Stretcher and wheelchair points, and elevators.
- Patient boards and door signs on the walls, and pharmacists.
Each hospital gets a map blip with its own icon and colour. Nothing is saved until you press Save, and closing the builder keeps what you were working on. It ships with no hospitals; until you build one, respawns go to Pillbox.
Getting hurt and going down
Every hit lands on a body part. Gunshots bleed and can leave the bullet in, knives cut and stab, fists and bats break bones and concuss, falls hurt the legs, cars crush, and fire burns. Body armour can stop a bullet to the chest.
Blood drains while anything bleeds, and at 55% you go down. Down, you can crawl and press G to call for help, and a timer shows how long until your heart stops. Then it is no pulse, where CPR and a defibrillator can bring you back while the rhythm is still shockable, and finally a flatline. After a while you can hold E to wake up in hospital with a bill.
/injuries shows your own wounds and lets you use your own supplies on them.
Treating patients
Medics target the patient or press F7 for the tablet. The Patient page shows the live monitor, a body map and every wound with what it needs. Click one to treat it. Each treatment takes 3 to 5 seconds, and the wound is gone once nothing is left to do on it.
Twelve supplies each have one job: bandage, tourniquet, pressure dressing, splint, burn dressing, painkillers, morphine, IV saline, adrenaline, defibrillator, first aid kit and IFAK. Config.Supplies sets who can use each one, and whether players can use it on themselves.
Take a stretcher from the back of an ambulance or a stretcher point and push it. X sets it down, G puts it away. Target a patient on it to load them into the ambulance. Wheelchairs work the same way.
The medic tablet
Medics open it with F7, /medtablet, the medical_tablet item, or by examining a patient. It has Patient, Calls, Hospital, Patient records, Prescriptions, Care reports and the Roster.
Using another MDT? Turn off any of the record pages in Config.Tablet.pages: records, prescriptions, care reports and the roster. Patient, Calls and Hospital always stay, because treating, call alerts and beds live there.
Set Config.Tablet.needItem = true if medics should need the item to open the tablet at all.
Surgery and pharmacies
Bullets left in, internal bleeding and bad breaks need an operating table. Each wound is three steps: incision, repair and sutures. The lowest rank that can operate is Config.Grades.surgery.
A medic writes a prescription on the tablet, and the patient takes it to any pharmacist, who pulls their record and fills it. Pharmacists also sell painkillers, bandages and burn dressing over the counter. The medicines are in Config.Medicines.
Dispatch and screens
Calls for help, passer-by reports, /911e and officer-down calls go to every medic on duty, on the tablet and as an alert on screen. Y takes the call and sets GPS, U hides it. XS-Dispatch, ps-dispatch, qs-dispatch, cd_dispatch, core_dispatch, rcore_dispatch and linden_outlawalert get the call too.
Patient boards list everyone at the hospital, door signs show who is in a room, and bedside monitors show live vitals. Names can be full, first name and initial, or initials only.
Coming from qbx_medical or qb-ambulancejob
There is nothing to move. isdead, inlaststand and armor stay where they were, and the old exports, events and state bags still answer, so radios, phones, inventories and admin menus keep working. txAdmin's heal button works too.
Troubleshooting
Deaths act strangely or twice
Another medical script is still running. Stop qbx_medical, qbx_ambulancejob or qb-ambulancejob and take them out of server.cfg.
/medicalbuilder does nothing
You do not have access. Run add_ace group.admin xs.medical.admin allow, or add your group to Config.Admin.groups.
Using an item does nothing
On ox_inventory, the client export line is missing from that item. Paste the items from items/ox_inventory.lua as they are.
Check-in does not work
No hospital is built yet, or it has no check-in point or beds. Build them with /medicalbuilder.
The tablet will not open
Only medics on duty can open it. Check Config.Jobs matches your EMS job. With Config.Tablet.needItem on, they also need the medical_tablet item.
My dispatch script does not get medical calls
Run /medicaldiag to see which one was found, then set Config.Bridges.dispatch to its name.
The stretcher sits wrong
Stretcher models differ. Tune Config.Stretcher push and lie to fit yours.
Updating
- Back up the database first.
- Keep a copy of your edited
config.lua. - Replace the resource folder, merge your config back and restart.
Your hospitals, records, prescriptions and reports live in the database, so nothing you set up is lost.
Support
Bugs and questions go to the Discord. Include your server's console output — the resource prints the reason when it refuses to do something, and that line is usually the whole answer.