Commands#
Medical Creator registers a few chat commands. Some depend on your framework, because they come from its bridge.
Command | Who | Description |
|---|---|---|
| Admins, | Opens the hospital creator. |
| EMS on duty |

Documentation
Quasar Medical Creator commands (/hospital_creator, /revive, /heal) and developer API: the dead state bag, revive and heal events, the death event and EMS actions for radial menus.
Medical Creator registers a few chat commands. Some depend on your framework, because they come from its bridge.
Command | Who | Description |
|---|---|---|
| Admins, | Opens the hospital creator. |
| EMS on duty |
Opens the EMS menu. Bound to F5 by default ( |
| Admins | Revives a player, or yourself without an id. Logged to the |
| Admins, | Prints free, occupied and reserved beds to the server console. Needs |
| EMS — ESX | Fully heals yourself. |
| EMS — QBCore / Qbox | Fully heals yourself. Logged to the |
| Admins — QBCore / Qbox | Fully heals a player, or yourself. Logged. |
| Admins — QBCore / Qbox | Downs a player, or yourself — handy for testing. |
[id] is the player's server id. Admins are ESX admin / superadmin, or QBCore god / admin / ace command. txAdmin's Heal button revives through Medical Creator as well.
With
Config.Debug = true— the shipped value — extra test commands are registered for setting up. Set it tofalseon a live server so players cannot use them.
Whether a player is down is published as a replicated state bag, readable from any client or server script without calling Medical Creator:
-- Server
local state = Player(source).state.dead
-- Client, for yourself
local state = LocalPlayer.state.dead
-- Client, for another player
local state = Player(GetPlayerServerId(playerIndex)).state.dead
-- Values:
-- nil / false alive
-- 'lastStand' downed, crawling, can still be revived
-- 'dead' dead, or lying in a hospital bed after check-in
if state then
-- block robbing, emotes, inventory, phone calls...
endOn ESX the same value is also kept in Player(source).state.isDead and in users.is_dead; on QBCore and Qbox in the isdead and inlaststand metadata — so scripts written for the stock ambulance job keep working.
Medical Creator has no revive export: another resource sends the same client events the script uses itself.
-- Server
TriggerClientEvent('ambulance:revivePlayer', targetId)Stands the player up where they are with full health, clears injuries and medications, cleans the blood, resets hunger and thirst through the framework and closes their distress call.
-- Server
TriggerClientEvent('ambulance:healPlayer', targetId, true) -- full heal
TriggerClientEvent('ambulance:healPlayer', targetId, false) -- small heal
TriggerClientEvent('ambulance:healPlayer', targetId, true, true) -- full heal, no notificationA full heal restores health and clears every injury. A small heal adds a little health and, with Config.AmbulanceItems.heal.healBleed, stops the bleeding.
TriggerClientEvent('esx_ambulancejob:revive', targetId) -- still works on ESXMedical Creator answers the old revive event on ESX, so admin menus and other scripts that used it need no change. On QBCore and Qbox, replace hospital:client:Revive with ambulance:revivePlayer.
The moment a player goes down, a local client event fires with what killed them — useful for a kill feed, a gang war score or ending a heist:
-- Client
AddEventHandler('ambulance:onPlayerDeath', function(data)
-- data.killedByPlayer true when another player did it
-- data.killerServerId their server id (when killed by a player)
-- data.deathCause weapon hash (see Config.WeaponNames in shared/data.lua)
-- data.victimCoords where it happened
-- data.killerCoords, data.distance (when killed by a player)
end)The same table is sent to the server as the net event ambulance:onPlayerDeath. It comes from the victim's client, so treat it as information, not proof.
Every action in the EMS menu is also a client event, so qb-radialmenu, ox_lib's radial or any other menu can offer them. They run the same checks as the menu: job, duty, distance and items.
TriggerEvent('ambulance:interaction:diagnose')
TriggerEvent('ambulance:interaction:revive')
TriggerEvent('ambulance:interaction:heal')
TriggerEvent('ambulance:interaction:sedate')
TriggerEvent('ambulance:interaction:toggle_vehicle') -- put in / take out of the ambulance
TriggerEvent('ambulance:interaction:bill')
TriggerEvent('ambulance:interaction:dispatch')
TriggerEvent('ambulance:interaction:stretcher')
TriggerEvent('ambulance:interaction:wheelchair')
TriggerEvent('ambulance:interaction:pickupMedBag')
TriggerEvent('ambulance:interaction:interactMedBag')For example, an ox_lib radial entry:
lib.addRadialItem({
id = 'ems_revive',
icon = 'heart-pulse',
label = 'Revive',
onSelect = function()
TriggerEvent('ambulance:interaction:revive')
end
})The medical items are ordinary inventory items, so a reward, a crafting bench or a job shop just adds them with your inventory's own API — Medical Creator handles what happens when they are used. Names are listed in Inventory Items.
exports.ox_inventory:AddItem(source, 'medikit', 2)
exports.ox_inventory:AddItem(source, 'defib', 1)