NullSect
Systems nominal

Docs / Ambulance Job / Configuration

Configuration — ns-ambulancejob

Everything is in config.lua. The sections below follow its order.

General

KeyDefaultMeaning
Config.Framework'auto'qbox / qbcore / esx / standalone
Config.Locale'en'en, tr (add locales/<code>.lua)
Config.Inventory'auto'ox / framework / none
Config.Features.*onDeathScreen, EmsCall, GiveUp, Respawn, Recap, Heartbeat, ScreenEffect, InjuryEffects, CheckIn, Carry, VehicleLoad, Rewards, QbxMedicalCompat
Config.Jobambulance, grade 0, on dutywho counts as EMS for job points, cabinet and payouts

Patient model — Config.Physiology

KeyDefaultMeaning
bloodVolume5000ml
collapseAt / arrestAt / wakeAt0.62 / 0.40 / 0.68blood volume fractions: collapse, cardiac arrest, minimum to be woken
wakeMaxBleed0.35ml/s of bleeding still allowed when waking
lossPerHealth6ml lost at once per health point of damage (× kindLoss)
severity15 / 35 / 70health lost by one hit → severity 1..4
bleed0.3 / 0.9 / 2.0 / 3.6ml/s of an untreated wound by severity (× kindBleed)
downBleedFactor / deadBleedFactor0.85 / 0.12lower pressure while down / no pressure in arrest
regenRate0.6ml/s the body makes back while alive and not bleeding
fluidBag / fluidRate / fluidCap500 / 8 / 0.85saline bag, ml/s it runs in, the most saline can restore
hypoxicSpo2 / hypoxicSeconds70 / 90low SpO₂ for this long while down stops the heart
vfSeconds / irreversibleAfter240 / 600no-flow seconds: VF → asystole, ROSC no longer possible
pvtSeconds / pvtShare90 / 0.3(0.11) no-flow seconds: pulseless VT → VF; share of sudden arrests that start in pulseless VT
cprSlows / cprCycle0.85 / 30how much perfect CPR slows the clock, seconds per ROSC check
treat.dressing0 / 0 / 0.35 / 0.7bleeding left under a dressing by severity
drugs.*how long epinephrine, amiodarone, TXA, opioid and naloxone act (s) and the TXA factor
drugs.localEpiSeconds / localEpiFactor / localEpiSevere600 / 0.35 / 0.85(0.11) local epinephrine on a wound: how long, bleeding left (severity 1-3), bleeding left of an artery (severity 4)
rosc.*ROSC chances: shock on VF / pulseless VT (shockPvt bonus) and its bonuses, CPR cycle per rhythm, epinephrine, airway, restored volume in PEA

Rhythms with a pulse — Config.Physiology.rhythms (0.11)

VT, SVT and AF with a fast rate. Only while knocked down; the patient cannot be woken until it is converted.

KeyDefaultMeaning
hr / sbpVT 180 / 38, SVT 190 / 28, AF 150 / 20heart rate in that rhythm / systolic blood pressure lost
vtArrest150s: VT with a pulse left alone turns into pulseless VT
postRoscVt0.2chance of VT with a pulse right after ROSC from VF / pulseless VT
contusion{ vt = 0.2, af = 0.3 }chances at collapse after a high-energy blunt chest hit
cardiovertVT 100 J 0.85, SVT 50 J 0.9, AF 120 J 0.75synchronised shock: recommended energy and chance (half below that energy)
amio{ vt = 0.6, af = 0.35, svt = 0.15 }chance one amiodarone dose converts it

Chest — Config.Physiology.chest (0.11)

Pneumothorax and tension pneumothorax. Remove the whole table to switch the chest model off.

KeyDefaultMeaning
penetratingSev / bluntSev2 / 3torso gunshot / stab of this severity, or high-energy blunt hit of this severity, collapses a lung
tensionSeconds / openVent300 / 0.25s from nothing to full tension (closed or sealed); an open wound builds it this much as fast
collapseAt0.6tension at which a conscious patient collapses (1.0 while down = cardiac arrest in PEA)
spo2 / rr / hr / sbp28 / 14 / 45 / 55vital signs changed at full tension
simpleSpo23SpO₂ lost to a pneumothorax without tension (also after decompression)
absentAt / tracheaAt0.35 / 0.7breath sounds absent from this tension; the trachea shifts from this one
arrestRosc0.05ROSC odds kept in arrest while a tension pneumothorax is not decompressed

Tuning tip: to make patients last longer before arrest, lower bleed or arrestAt. To make field care matter more, raise bleed and the rosc.cprEpi bonuses.

Wrong treatment — Config.Physiology.complications (0.6)

Used while Config.Features.Complications = true. A harmful step goes through and hurts the patient; a useless one is still refused. Chances are 0..1. Epinephrine, amiodarone and a manual shock are always refused on a conscious patient (0.9), whatever this table says.

KeyDefaultMeaning
gagSeconds / gagSpo2 / gagRr180 / 10 / 6OPA / i-gel / BVM on a conscious patient: how long, SpO₂ lost, breaths per minute more
needlessTqBleed / needlessTqPain0.05 / 2a tourniquet where no wound bleeds this much (ml/s) is needless: extra pain, numb limb
tqLimit / tqLongPain1200 / 2(0.9) s a tourniquet may stay on; longer hurts the limb once (wounds one severity worse, extra pain, numb until the hospital). 0 = no limit
epiPulseArrest / epiPulseBleed / epiPulseHr0.25 / 1.5 / 30epinephrine with a pulse: VF chance, bleeding factor, heart rate up
epiMinInterval150s: epinephrine again sooner than this in arrest injures the heart
amioPulseArrest / amioPulseSbp / amioPulseHr0.15 / 35 / 30amiodarone with a pulse: asystole chance, blood pressure and heart rate lost
opioidCollapse2.5fentanyl load (about doses still working) that makes a conscious patient collapse
fluidSafe / overloadSpo2 / overloadRr / overloadBleed2000 / 4 / 3 / 0.15saline in the body at once above this (ml; cleared at regenRate while the heart beats): per extra bag SpO₂ lost, breaths more, bleeding factor
shockPulseArrest0.8manual shock on a patient with a pulse: VF chance (a chest burn always)
syncSinusArrest0.05(0.11) SYNC shock on a normal rhythm: VF chance (a chest burn always)
epiPulseVt0.35(0.11) epinephrine with a pulse: chance of VT with a pulse when no VF
heartInjury.shock / heartInjury.epi / heartInjuryMax0.15 / 0.10 / 0.6ROSC odds lost per shock on asystole / PEA and per early epinephrine, and the cap
cprRibs2severity of the torso fracture from CPR on a patient with a pulse

The medic who made a mistake earns nothing more for that emergency.

Bags — Config.Kits

KeyMeaning
trackSuppliesfalse = unlimited supplies
bls.item / als.itemitem names (bls_kit, als_kit)
bls.jobs / als.jobsnil = anyone with the bag; { ambulance = 1 } = job = minimum grade
*.suppliessupply = full count (what a restock fills up to)
*.equipmentnever used up (bvm, aed, cuff, oximeter, monitor)

0.11: the ALS bag has needle = 2 (needle decompression). Local epinephrine uses the epinephrine ampoules.

Care — Config.Care

KeyDefaultMeaning
distance3.0metres between rescuer and patient (checked on every step)
tick1.0seconds between two patient model updates
showNamefalsecare view shows the character name instead of "Patient #id"
selfActionsdressing, gauze, tourniquet, splint, burnpad, chestseal, tq_offwhat you may do on yourself
durations.*ms per step (the server measures them); tq_off / iv_off / collar_off / o2_off take things off again (0.9)
defib.energies / defaultEnergy / chargeMs / analyzeMs50..360 / 200 / 4000 / 5000defibrillator (50 / 100 J since 0.11, for cardioversion)
cpr.rateMin / rateMax100 / 120compressions per minute counted as good
cpr.depthtrue(0.4) a good compression must also reach 5-6 cm (hold SPACE ~0.2 s) and let the chest recoil; false = rate only

Equipment — Config.Equipment, Config.Minigames (0.2)

KeyMeaning
stretcher.modelsthe first model that exists is used: ns_ambulance_stretcher (comes with the resource), then m25_2_prop_m52_gurney_01a (the game's gurney, game build 3717+), then v_med_emptybed
stretcher.fit[model] / fit.defaultauto = true: placed from the model's size; gap m between pusher and near end, mattress at surface of the height, patient lie m above it. Or fixed push = { offset, rotation }, patient = { offset, rotation }
stretcher.patientheading of the patient on it, lying animation (dict, anim)
wheelchairmodels, push offset / rotation on the pusher, patient offset / rotation / animation
pushAnimthe pusher's upper-body animation
walkingAidprop models, hand bone, offset / rotation, walk clipset, stumbleChance
bag.bls / bag.alsprop models of a bag on the ground
bodyBag.modelsbody bag props
placedBagLifetimeseconds before a bag on the ground goes back to its owner
Config.Minigames.actionsaction = game (iv = 'vein', tourniquet = 'windlass', gauze = 'packing'; 0.10: chestseal = 'seal', splint = 'splint', igel = 'igel', bvm = 'bvm'); remove a line to use the plain timer
Config.Minigames.difficulty0.6 easier .. 1.5 harder (needle / windlass / traction speed, target sizes and bands, gauze needed)

The new features can be turned off one by one in Config.Features: Stretcher, Wheelchair, WalkingAid, StumbleOnFracture, PlaceBags, BodyBag, VehicleMonitor, Minigames, Handbook (0.3.0: the pocket guide tab in the care view; its text is in the hb_* locale keys), NextStep (0.4.0: the "Next" strip in the care view header and the glowing bag item for it), Complications (0.6.0: wrong treatment hurts the patient, see above; off = wrong steps are refused).

Death screen

Config.Keys (G / H / E), Config.Down (health while down, knockout seconds), Config.Respawn (timer, timer when EMS was on duty, block while EMS online / while treated, fee, account, hospital, item removal + keep list), Config.GiveUp, Config.Ems (jobs, cooldown, calls per emergency, dispatch provider, automatic alert, panicJobs / panicCooldown for the qbx_radialmenu emergency button), Config.Recap (killer display), Config.Hud, Config.Effects.

First aid items — Config.FirstAid (0.7)

Used while Config.Features.FirstAid = true. Each key of items is an item name, registered as a usable item.

FieldMeaning
selftrue: on yourself; false: on the nearest other player within distance (3 m)
dresshow many wounds get a dressing, most bleeding first (burns and fractures are left for EMS)
closea dressed wound of this severity or lower closes (1 = light)
painkillerone pill: Config.Physiology.drugs.oralRelief (2) pain points less per pill for oralSeconds (600), at most oralMaxDoses (2) at once
healthhealth points back (alive patients only)
wakea knocked-down patient wakes up when the medic's wake rule allows it (wakeAt, wakeMaxBleed)
seconds / label / animuse time (measured by the server), progress text locale key, a key of Config.FirstAid.anim

Defaults: bandage (1 dressing, 4 s), ifaks (2 dressings + pill, 5 s), painkillers (pill, 3 s), firstaid (6 dressings + wake, on someone else, 20 s). Remove an item from the list to leave it to another resource.

Hospitals — Config.Hospitals, Config.CheckIn

Each hospital has label, coords + radius (nearest pick and the admit area), reception (doctor ped + check-in) and beds (vector4). Config.CheckIn: fee, account, maxEmsOnline (-1 = always open), bed time (base

  • per severity point, max), admitSeconds, ped model. Config.Society(account, amount, reason) can send fees to your society account.

Optional per hospital (0.8): pharmacy (vector4, the pharmacist) and elevators (see below).

The default config has Pillbox Hill and Paleto Bay. There is no default Sandy Shores hospital (the vanilla building has no interior): with a Sandy MLO use its preset, otherwise add one with /emseditor.

Hospital presets — Config.Presets (0.8)

Config.Presets = { 'gabz_hospital' } loads presets/gabz_hospital.lua: one hospital and its job point(s), for that MLO. A preset hospital with the key of a default (pillbox, paleto) replaces it, a job point with the id of a default replaces it; anything else is added. Use the preset of the map you run; the list of names is in config.lua. A preset is plain data, in the same format as Config.Hospitals / Config.JobPoints, so you can copy one to make your own. Points moved with /emseditor win over the preset; "Back to config.lua" in the editor goes back to the preset. Check the beds, spawns and elevator stops once in game: maps differ between versions.

Elevators (0.8)

elevators = { { stop, stop, ... }, ... } on a hospital, one list per elevator (two to twelve stops). A stop:

FieldMeaning
label / floorname: a locale key (elevator_roof, elevator_garage, elevator_hospital, elevator_lobby) or plain text; or a floor number ("Floor 2")
coordswhere you arrive (vector4)
panelsoptional vector3 list: where the buttons are (default: the arrival point)
jobtrue: the button on this stop is for EMS employees only

Pharmacy — Config.Pharmacy (0.8)

account (default cash), maxAmount per purchase, pedModel, items = { { name, price }, ... } in menu order.

Wardrobe — Config.Wardrobe (0.8)

provider: auto (illenium-appearance, then qb-clothing), illenium-appearance (work outfits from its config or boss-managed outfits, or your own outfits), qb-clothing (outfit menu), custom (Config.Wardrobe.custom, client side) or none.

Job points — Config.JobPoints, Config.Vehicles, Config.Stash

Per point: duty, cabinet, stash, wardrobe, garage = { coords, spawn }, heli = { coords, spawn } (all optional). Config.Vehicles.ground / air: { model, grade, livery? }. ems: the models you can load patients into and restock from. patientSeats: rear seat indexes.

Rewards — Config.Rewards

treat, wake, rosc, admit, bodybag per event, perEmergency cap per medic per patient emergency, account.

Commands — Config.Commands

revive, heal, kill, preview, kit, practice, tablet (/ems), editor (/emseditor), callout (/emscallout). Set one to '' to disable it.

Tablet — Config.Tablet (0.5)

  • key: default key of the tablet ('' = none; players bind it under Settings > Key Bindings > FiveM).
  • item: e.g. 'ems_tablet' to require an item (using it opens the tablet). nil = command / key / vehicle only.
  • vehicleOption: the "EMS tablet" target option at EMS vehicles.
  • boardRefresh: seconds between board updates while a tablet is open.
  • readAllGrade: grade that reads every PCR report (bosses always can).
  • caseCloseAfter: seconds a case stays on the board once the patient is up and nobody treats him.
  • caseKeep: seconds a closed case can still get a report. reportReward: paid once per case to a medic who treated the patient (0 = off). narrativeMax: length of the report text.

Features: Config.Features.Tablet, Reports, BossPanel, Missions, Insurance, LocationEditor.

Management — Config.Boss

grade (minimum grade of the Management tab, nil = the framework's boss flag), hireDistance, and an optional balance = function() return ... end to show the society account.

Insurance — Config.Insurance

plans = { id = { price, days, discount } } (discount = part of the fee the plan pays, 1.0 = all), account, covers = { checkin, admit, respawn }. Plan names come from the locale (ins_plan_<id>). Buying the same plan adds its days; another plan replaces it.

NPC call-outs — Config.Missions

  • interval / jitter: seconds between calls; minEms: medics on duty needed; maxOpen: calls at once.
  • callTimeout: an unanswered call expires; timeout: from accepting to hand-over; keepAway: metres from any medic a new call keeps.
  • peds: patient models. pay: base + perSeverity x the outcome factor (alive, down, arrest, deceased), split between the medics who treated him.
  • scenarios: { weight, phase = 'alive' | 'down' | 'dead', blood (fraction), wounds = { { zone, kind, severity } }, opioid }. Labels come from the locale (scn_<name>).
  • spots: vector4 list (examples); edit them in game with /emseditor.

Location editor — Config.Editor

range (metres a saved point may be from the admin), maxBeds per hospital, maxSpots.

Discord log — Config.Features.Logs, Config.Logs (1.0)

Off by default. Turn on Config.Features.Logs and put the webhook in server.cfg (never in config.lua, which clients can read):

set ns_ambulancejob_webhook "https://discord.com/api/webhooks/..."

Config.Logs.events switches each category: death (knocked down, cardiac arrest, cause, place), revive (woke up, ROSC, hospital, respawn, the medic who did it), admin (every admin command and the Revive / Heal exports), money (medic payouts, hospital fees, pharmacy, insurance), boss (hire, fire, grade), security (server-side security flags). username is the name the messages are posted under. Messages are sent in batches of up to 10 every 2 seconds.

Cart

Your cart is empty.