Exports & Events
For developers connecting other scripts to the medical system.
- Server Exports: Revive, injure, query state, pull medical records, register drugs.
- Client Exports: Player state, injuries, impairment, opening UI.
- Events & State Bags: Everything the script fires, and the state bags it keeps.
🎯 The two you will actually use
Slow down your script for injured players
duration = 5000 * exports['kartik-ambulancejob']:getActionSpeed()Wire this into lockpicking, crafting, jobs and heists and a broken arm slows down a player's entire life, not just their combat. Highest value for least effort.
Hook your drug items into addiction
-- once, on resource start
exports['kartik-ambulancejob']:RegisterAddictiveDrug('oxy', {
class = 'opioid',
addiction = { type = 'opioid', gain = 20 },
overdose = { doses = 3, window = 900, disease = 'opioid_overdose' },
})
-- every time the item is used
exports['kartik-ambulancejob']:RecordDrugUse(source, 'oxy')🔄 Legacy compatibility
If your script already talks to qbx_medical, qb-ambulancejob or esx_ambulancejob, you do not need to change anything. Those exports and events are answered by the compatibility layer.
Supported:
qbx_medicalexports and events, and itsisDead/qbx_medical:deathStatestate bags, pma-voice, phones and appearance menus that check them keep workingqb-ambulancejob,esx_ambulancejobandwasabi_ambulanceexportshospital:client:Revive,hospital:client:HealInjuries,esx_ambulancejob:reviveand friends
The full list is in Events & State Bags → Legacy events.
Setting up an admin menu (919Admin, vMenu, EasyAdmin…)? Its revive hook is in Events & State Bags → Admin menus.
See Config.Compat in General & Compatibility.