Configuration — ns-ambulancejob
Everything is in config.lua. The sections below follow its order.
General
| Key | Default | Meaning |
|---|---|---|
Config.Framework | 'auto' | qbox / qbcore / esx / standalone |
Config.Locale | 'en' | en, tr (add locales/<code>.lua) |
Config.Inventory | 'auto' | ox / framework / none |
Config.Features.* | on | DeathScreen, EmsCall, GiveUp, Respawn, Recap, Heartbeat, ScreenEffect, InjuryEffects, CheckIn, Carry, VehicleLoad, Rewards, QbxMedicalCompat |
Config.Job | ambulance, grade 0, on duty | who counts as EMS for job points, cabinet and payouts |
Patient model — Config.Physiology
| Key | Default | Meaning |
|---|---|---|
bloodVolume | 5000 | ml |
collapseAt / arrestAt / wakeAt | 0.62 / 0.40 / 0.68 | blood volume fractions: collapse, cardiac arrest, minimum to be woken |
wakeMaxBleed | 0.35 | ml/s of bleeding still allowed when waking |
lossPerHealth | 6 | ml lost at once per health point of damage (× kindLoss) |
severity | 15 / 35 / 70 | health lost by one hit → severity 1..4 |
bleed | 0.3 / 0.9 / 2.0 / 3.6 | ml/s of an untreated wound by severity (× kindBleed) |
downBleedFactor / deadBleedFactor | 0.85 / 0.12 | lower pressure while down / no pressure in arrest |
regenRate | 0.6 | ml/s the body makes back while alive and not bleeding |
fluidBag / fluidRate / fluidCap | 500 / 8 / 0.85 | saline bag, ml/s it runs in, the most saline can restore |
hypoxicSpo2 / hypoxicSeconds | 70 / 90 | low SpO₂ for this long while down stops the heart |
vfSeconds / irreversibleAfter | 240 / 600 | no-flow seconds: VF → asystole, ROSC no longer possible |
pvtSeconds / pvtShare | 90 / 0.3 | (0.11) no-flow seconds: pulseless VT → VF; share of sudden arrests that start in pulseless VT |
cprSlows / cprCycle | 0.85 / 30 | how much perfect CPR slows the clock, seconds per ROSC check |
treat.dressing | 0 / 0 / 0.35 / 0.7 | bleeding left under a dressing by severity |
drugs.* | how long epinephrine, amiodarone, TXA, opioid and naloxone act (s) and the TXA factor | |
drugs.localEpiSeconds / localEpiFactor / localEpiSevere | 600 / 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.
| Key | Default | Meaning |
|---|---|---|
hr / sbp | VT 180 / 38, SVT 190 / 28, AF 150 / 20 | heart rate in that rhythm / systolic blood pressure lost |
vtArrest | 150 | s: VT with a pulse left alone turns into pulseless VT |
postRoscVt | 0.2 | chance 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 |
cardiovert | VT 100 J 0.85, SVT 50 J 0.9, AF 120 J 0.75 | synchronised 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.
| Key | Default | Meaning |
|---|---|---|
penetratingSev / bluntSev | 2 / 3 | torso gunshot / stab of this severity, or high-energy blunt hit of this severity, collapses a lung |
tensionSeconds / openVent | 300 / 0.25 | s from nothing to full tension (closed or sealed); an open wound builds it this much as fast |
collapseAt | 0.6 | tension at which a conscious patient collapses (1.0 while down = cardiac arrest in PEA) |
spo2 / rr / hr / sbp | 28 / 14 / 45 / 55 | vital signs changed at full tension |
simpleSpo2 | 3 | SpO₂ lost to a pneumothorax without tension (also after decompression) |
absentAt / tracheaAt | 0.35 / 0.7 | breath sounds absent from this tension; the trachea shifts from this one |
arrestRosc | 0.05 | ROSC 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.
| Key | Default | Meaning |
|---|---|---|
gagSeconds / gagSpo2 / gagRr | 180 / 10 / 6 | OPA / i-gel / BVM on a conscious patient: how long, SpO₂ lost, breaths per minute more |
needlessTqBleed / needlessTqPain | 0.05 / 2 | a tourniquet where no wound bleeds this much (ml/s) is needless: extra pain, numb limb |
tqLimit / tqLongPain | 1200 / 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 / epiPulseHr | 0.25 / 1.5 / 30 | epinephrine with a pulse: VF chance, bleeding factor, heart rate up |
epiMinInterval | 150 | s: epinephrine again sooner than this in arrest injures the heart |
amioPulseArrest / amioPulseSbp / amioPulseHr | 0.15 / 35 / 30 | amiodarone with a pulse: asystole chance, blood pressure and heart rate lost |
opioidCollapse | 2.5 | fentanyl load (about doses still working) that makes a conscious patient collapse |
fluidSafe / overloadSpo2 / overloadRr / overloadBleed | 2000 / 4 / 3 / 0.15 | saline in the body at once above this (ml; cleared at regenRate while the heart beats): per extra bag SpO₂ lost, breaths more, bleeding factor |
shockPulseArrest | 0.8 | manual shock on a patient with a pulse: VF chance (a chest burn always) |
syncSinusArrest | 0.05 | (0.11) SYNC shock on a normal rhythm: VF chance (a chest burn always) |
epiPulseVt | 0.35 | (0.11) epinephrine with a pulse: chance of VT with a pulse when no VF |
heartInjury.shock / heartInjury.epi / heartInjuryMax | 0.15 / 0.10 / 0.6 | ROSC odds lost per shock on asystole / PEA and per early epinephrine, and the cap |
cprRibs | 2 | severity 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
| Key | Meaning |
|---|---|
trackSupplies | false = unlimited supplies |
bls.item / als.item | item names (bls_kit, als_kit) |
bls.jobs / als.jobs | nil = anyone with the bag; { ambulance = 1 } = job = minimum grade |
*.supplies | supply = full count (what a restock fills up to) |
*.equipment | never 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
| Key | Default | Meaning |
|---|---|---|
distance | 3.0 | metres between rescuer and patient (checked on every step) |
tick | 1.0 | seconds between two patient model updates |
showName | false | care view shows the character name instead of "Patient #id" |
selfActions | dressing, gauze, tourniquet, splint, burnpad, chestseal, tq_off | what 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 / analyzeMs | 50..360 / 200 / 4000 / 5000 | defibrillator (50 / 100 J since 0.11, for cardioversion) |
cpr.rateMin / rateMax | 100 / 120 | compressions per minute counted as good |
cpr.depth | true | (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)
| Key | Meaning |
|---|---|
stretcher.models | the 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.default | auto = 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.patient | heading of the patient on it, lying animation (dict, anim) |
wheelchair | models, push offset / rotation on the pusher, patient offset / rotation / animation |
pushAnim | the pusher's upper-body animation |
walkingAid | prop models, hand bone, offset / rotation, walk clipset, stumbleChance |
bag.bls / bag.als | prop models of a bag on the ground |
bodyBag.models | body bag props |
placedBagLifetime | seconds before a bag on the ground goes back to its owner |
Config.Minigames.actions | action = 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.difficulty | 0.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.
| Field | Meaning |
|---|---|
self | true: on yourself; false: on the nearest other player within distance (3 m) |
dress | how many wounds get a dressing, most bleeding first (burns and fractures are left for EMS) |
close | a dressed wound of this severity or lower closes (1 = light) |
painkiller | one pill: Config.Physiology.drugs.oralRelief (2) pain points less per pill for oralSeconds (600), at most oralMaxDoses (2) at once |
health | health points back (alive patients only) |
wake | a knocked-down patient wakes up when the medic's wake rule allows it (wakeAt, wakeMaxBleed) |
seconds / label / anim | use 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:
| Field | Meaning |
|---|---|
label / floor | name: a locale key (elevator_roof, elevator_garage, elevator_hospital, elevator_lobby) or plain text; or a floor number ("Floor 2") |
coords | where you arrive (vector4) |
panels | optional vector3 list: where the buttons are (default: the arrival point) |
job | true: 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 + perSeverityx 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.