πMedical Help
Step by step installation guide for ESX / QB / QBox, common issues & solutions, troubleshooting guide, code snippets, changelog.

Overview
XeX MedicalHelp is a premium heal, revive, and carry system for FiveM servers. It provides configurable NPC-based interaction points where players can heal themselves or revive nearby downed players, with EMS count restrictions to ensure medical roleplay is not bypassed when ambulance players are online. A fireman's carry system allows players to transport others. Supports all three major frameworks.
Supported Frameworks
ESX Legacy
1.6.0+
β Full Support
QBCore
Latest
β Full Support
QBox (QBx)
Latest
β Full Support (requires ox_lib)
Features Summary
Medical
Heal Points
NPC-based locations where players heal to full HP
Medical
Revive Points
NPC-based locations to revive downed/dead players
Medical
Medical Animation
10-second medic tend animation during revive
Medical
Cost System
Configurable cash cost per point (or free)
Carry
Fireman's Carry
Pick up and carry other players
Carry
Sync System
Server-synced carry animations between players
Carry
Toggle Command
Same command to start and stop carrying
EMS
EMS Restriction
Points hidden when EMS count exceeds threshold
EMS
Real-time Tracking
Server tracks EMS job changes and connections
Access
Job Whitelisting
Restrict specific points to certain jobs
NPC
Custom Peds
Spawn configurable NPC at each point
NPC
NPC Animation
Guard idle animation on spawned NPCs
NPC
Invincible NPCs
NPCs are frozen, invincible, and non-reactive
Map
Blips
Per-point configurable map blips (sprite, scale, color)
Map
Markers
Per-point 3D markers with custom type and RGB color
Interact
ox_target
Optional ox_target sphere zones or entity targets
Interact
Marker + E
Traditional marker rendering + E key interaction
Webhook
Discord Logging
Log heal and revive actions with player identifiers
System
Auto Updater
JSON-based version checker
I18n
2 Languages
English, Spanish
Installation
Requirements
FiveM Server Build 5181+
Framework: ESX Legacy, QBCore, or QBox
Optional: ox_target (for target mode)
Optional: ox_lib (required for QBox)
Dependencies by Framework
ESX
es_extended, esx_ambulancejob
ox_target
QBCore
qb-core
ox_target
QBox
qbx_core, ox_lib
ox_target
Quick Start
Note: If using QBox, ensure
ox_libis started before this resource.
Configuration
General Settings
Config.Language
'en'
Locale for all text strings
Config.UseOxTarget
true
Use ox_target zones instead of 3D markers
Config.DrawDistance
20.0
Distance to start rendering 3D markers
Config.EMSJobName
'ambulance'
Job name to track for EMS online count
Framework Settings
'auto'
Auto-detects: QBox β QBCore β ESX
'esx'
Force ESX Legacy
'qb'
Force QBCore
'qbx'
Force QBox (requires ox_lib)
Heal & Revive Points
Each entry in Config.HRPoints defines one interaction point:
pointType
string
β
'revive' or 'heal'
maxEMS
number
β
Max EMS online before point is hidden
cost
number
β
Cash cost, 0 for free
location
table
β
World coordinates {x, y, z}
NPCEnabled
boolean
β
Whether to spawn an NPC (default: false)
NPCPed
string
β
Ped model hash name
NPCPedPosition
table
β
NPC position {x, y, z, h}
whitelistedJobs
table
β
Empty = all jobs allowed
blip
table
β
Map blip configuration
marker
table
β
3D marker configuration
Carry System
Discord Webhooks
How It Works
Complete Flow
Player approaches medical point β Marker/ox_target appears (if allowed) β Player interacts (E key or ox_target):
Heal: Checks HP < max β charges cost β heals to full β webhook
Revive: Finds nearest player β checks if dead β charges cost β plays medic animation (10s) β carries (optional) β revives β webhook
Point hidden if EMS count exceeds maxEMS threshold
EMS Count Restriction
The server tracks online EMS players in real-time:
When a player loads with job matching
Config.EMSJobName, count incrementsWhen a player changes to/from the EMS job, count updates
When an EMS player disconnects, count decrements
Count is broadcast to all clients via
xex_medicalhelp:updateEmsCountPoints with
maxEMS < currentEMSCountare hidden
Use case: When enough real EMS players are online, NPC heal/revive points automatically disappear, encouraging roleplay with real medics.
Job Whitelisting
Each point can restrict access to specific jobs:
This allows creating "illegal" medical points restricted to criminal organizations.
The isAllowedJobForPoint() function supports both:
String job data (ESX format:
myJob = 'police')Table job data (QB/QBx format:
{name = 'police', grade = 2})
ox_target vs Marker Mode
Activation
Config.UseOxTarget = true
Config.UseOxTarget = false
Interaction
Click target icon
Press E key
NPC targeting
Entity target on NPC
Proximity check
No NPC
Sphere zone at coords
Marker at coords
Performance
Better (event-based)
Polling loop (1ms near, 2500ms far)
Dependency
Requires ox_target
None
Revive Mechanics
Player interacts with a revive point
Finds closest player within 5 units
Checks if target player is dead (
health == 0)If cost > 0, deducts cash via server callback
Plays
CODE_HUMAN_MEDIC_TEND_TO_DEADscenario (10 seconds)Optionally triggers carry command
Triggers revive event:
ESX:
esx_ambulancejob:reviveQB:
hospital:client:ReviveQBx:
hospital:client:Revive(via ox_lib)
Heal Mechanics
Player interacts with a heal point
Checks current HP < max HP
If cost > 0, deducts cash via server callback
Server triggers client-side heal (
SetEntityHealthto max)Shows notification
Carry System Mechanics
The carry system uses a fireman's carry animation:
Player executes
/{CarryCommand}(default:/carry)Finds closest player within 5 units
First press: attaches target to carrier with carry animation
Second press: detaches target and stops animation
All carry operations sync through server events
Interaction Modes
Marker + E Key Mode
When Config.UseOxTarget = false:
3D markers render at each point within
Config.DrawDistanceHelp text shows when within 1.5 units
Press E to interact
Dynamic wait loop: 1ms near markers, 2500ms when idle
ox_target Mode
When Config.UseOxTarget = true:
If NPC is enabled: entity target registered on the NPC ped
If no NPC: sphere zone at point coordinates (radius 1.5)
canInteractchecks: not busy, EMS count, job whitelistIcons:
fas fa-heartbeat(revive),fas fa-medkit(heal)
NPC System
Each point can optionally spawn an NPC:
NPCs are configured with:
Invincible β cannot be killed
Frozen β cannot be pushed or moved
Non-reactive β blocks fleeing behavior and temporary events
Animation β plays
missfbi_s4mop > guard_idle_aidle animationCleanup β model marked as no longer needed after spawn
Exports & Events
Server Exports
Server Callbacks
xex_revivehelp:paid
amount
boolean
Deduct cash and return success/failure
Server Events
xex_medicalhelp:heal
β
Heal the triggering player
xex_medicalhelp:revive
targetId
Revive target player
xex_medicalhelp:sync
carry data
Sync carry animation to target
xex_medicalhelp:stop
targetId
Stop carry on target
Client Events
xex_medicalhelp:updateEmsCount
count
Update local EMS count
xex_medicalhelp:setMyJob
jobName
Update local player job
xex_medicalhelp:heal
β
Apply heal (set max HP)
xex_medicalhelp:syncTarget
carry data
Apply carry animation to carried player
xex_medicalhelp:syncMe
carry data
Apply carry animation to carrying player
xex_medicalhelp:cl_stop
β
Stop carry animation and detach
Commands
/{CarryCommand}
Client
Toggle carrying the nearest player (default: /carry)
medicalhelp_update
Server Console
Manual update check
Localization
Supported Languages
en
English
es
EspaΓ±ol
Locale Keys Reference
heal_blip_text
Heal
Map blip label for heal points
revive_blip_text
Revive
Map blip label for revive points
press_to_revive
Press [E] to revive injured
Interaction prompt
press_to_heal
Press [E] to heal wounds.
Interaction prompt
heal_in_progress
Heal in progress...
During animation
healed
You have healed your wounds
Heal success
heal_completed_to
%s healed
Revive success (with name)
not_dead_player
Player is not dead
Cannot revive living player
no_money
You don't have enough money
Insufficient funds
not_nearby
There is no one around
No player in range
already_full
You are already full health
Cannot heal at max HP
webhook_heal_action
Heal
Webhook embed field
webhook_heal_title
Someone has been healed
Webhook embed title
webhook_revive_action
Has revived %s
Webhook embed field
webhook_revive_title
Someone has been resurrected
Webhook embed title
Adding Languages
Add a new entry in locales.lua:
Then set Config.Language = 'fr' in config.lua.
File Structure
Security
Server-side payment
Cash deduction validated on server via callback
EMS count server-tracked
Count managed entirely server-side, broadcast to clients
Job validation client-side
isAllowedJobForPoint() checks job before showing interaction
Revive target validation
Checks closest player exists, is within range, and is dead
isBusy guard
Prevents spamming interactions while animation plays
Carry distance check
Carry only works within 5 units of target player
Performance
ox_target mode
Event-based β zero polling when not interacting
Marker mode
1ms near markers, 2500ms when idle
NPC spawn
Model released after spawn (SetModelAsNoLongerNeeded)
Carry loop
1ms during carry, 1500ms when idle
EMS updates
Only on job change/connect/disconnect events
Troubleshooting
Changelog
v1.3.1
Bug fixes and stability improvements
v1.3.0
Added QBox (QBx) framework support with ox_lib integration
Added modern JSON-based auto-updater system
Removed legacy inline version check from framework files
Optimized client marker loops (vector math, cached variables)
Fixed
isBusyvariable casing inconsistencyFixed QB EMS count logic (job change tracking was inverted)
Fixed blip names showing 'Heal' for revive points
Added nil checks on server events
Added
SetModelAsNoLongerNeededfor NPC spawningUpdated
isAllowedJobForPointfor both string and table job data
v1.2.0
Major fix on EMS count for ESX + QBCore initial markers loading
v1.1.1
Distance check on /carry
v1.1.0
Reorganized configuration for unlimited map points
Added configurable props, blips, and markers per point
Added job restriction per point (illegal trades)
v1.0.0
Initial release
Support
Discord
Last updated