JCKSDocs
JCKS JobsV1Fonctions

Medical

The built-in down state, injuries, treatments, hospital check-in and EMS gear of JCKS Jobs 1.0.0.

The medical module lives in Config.Medical in data/config.services.lua.

When it runs

Config.Medical.enabled is true, false or 'auto' (default). With 'auto' it is on unless esx_ambulancejob, qb-ambulancejob, qbx_medical, wasabi_ambulance or ars_ambulancejob runs. Then JCKS Jobs keeps using that resource.

Down state

Players go down instead of dying, with downHealth health. While down:

  • G calls EMS (cooldown distressCooldown seconds),
  • E respawns at the closest hospital after respawnMinutes and pays respawnFee,
  • H calls an NPC medic when no EMS are on duty (npcMedic, npcAlways, npcDelaySeconds, npcFee).

Hospital fees go to the society in feeToJob (default ambulance). Being down survives a reconnect. With removeItemsOnRespawn = true ServerEditable.OnRespawn(src) runs on respawn, put your item removal there.

Injuries

A hit that takes at least injuryThreshold health counts as an injury on that body part, with the type gunshot, stab, blunt, burn, crash, fall or animal. Legs make the player limp and fall when sprinting, arms shake the aim, head injuries blur the view. Gunshot and stab wounds bleed every bleedInterval ms down to bleedFloor health and leave blood traces for forensics.

Command What it does
/examine Shows and treats the injuries of the closest player
/injuries Shows your own injuries
/revive [id] Admin revive
/heal [id] Admin heal
/revivearea [radius] Admin revive around you
/stretcher EMS stretcher

Command names are in Config.Medical.commands.

Treatments

Injury Item Time (ms) Heal
gunshot bandage 7000 20
stab bandage 6000 15
blunt painkillers 4000 10
burn burncream 6000 15
crash painkillers 5000 15
fall splint 8000 10
animal bandage 6000 15

EMS revive with reviveItem (default defibrillator) in reviveTime ms and get reviveReward, a treatment pays treatReward. rewardCooldown (600 s) stops paying again for the same patient. With civilianRevive anyone with firstAidItem (firstaid) can try CPR with civilianReviveChance percent, only while no EMS are online when civilianReviveOnlyWithoutEms = true.

Hospital check-in

Config.Medical.checkIn: at every hospital in hospitals an injured player pays fee (750) and is treated in a bed for duration ms while at most maxEms (0) EMS are on duty. The treatment is timed on the server. The default hospitals are Pillbox Hill, Sandy Shores and Paleto Bay, each with coords and beds.

EMS gear

Key Default What it changes
gear.stretcher true /stretcher spawns a stretcher: E push or release, G puts the closest patient on or off, next to an ambulance the patient goes into the back
gear.stretcherModel 'v_med_emptybed' Stretcher model
gear.bag true The medicalbag item is placed on the ground and works as a shared stash: E open, G pick up
gear.bagModel 'xm_prop_x17_bag_med_01a' Bag model
gear.bagSlots, gear.bagWeight 20, 30000 Bag stash size

Other resources

Exports IsDown, Revive, Heal and GetInjuries are in API. Job actions revive and heal go through ServerEditable.Revive and ServerEditable.Heal, see Field tools.