Exports
Exports documented currently for Wasabi Ambulance Job V2 (wasabi_ambulance_v2).
Client Exports
Medical
isPlayerDead
Check whether a player is dead or in last stand.
local isDead = exports['wasabi_ambulance_v2']:isPlayerDead(serverId?)
| Parameter | Type | Required | Description |
|---|---|---|---|
serverId | number | No | The server ID of the player to check. Omit to check the local player. |
Returns: boolean | true if the player's death state is greater than ALIVE (i.e. in last stand or fully dead).
inspectInjuries
Open the injury inspection UI targeting a specific ped.
exports['wasabi_ambulance_v2']:inspectInjuries(targetPed, skipCam?, viewOnly?)
| Parameter | Type | Required | Description |
|---|---|---|---|
targetPed | number | Yes | The ped entity handle to inspect. |
skipCam | boolean | No | If true, skips the cinematic inspection camera. Default false. |
viewOnly | boolean | No | If true, opens inspection in read-only mode (no treatment options). Default false. |
Returns: Nothing.
stopInspectingInjuries
Close the injury inspection UI and clean up the camera.
exports['wasabi_ambulance_v2']:stopInspectingInjuries()
Returns: Nothing.
diagnosePlayer
V1 compatibility export. Finds the closest player within 4 meters and opens the inspection UI on them.
exports['wasabi_ambulance_v2']:diagnosePlayer()
Returns: Nothing.
Dispatch
These exports are only available when the dispatch type is set to** "internal" **in the config.
openDispatchMenu
Open the dispatch menu for on-duty EMS players to view distressed players.
exports['wasabi_ambulance_v2']:openDispatchMenu()
Returns: Nothing.
getLocalDistressedCount
Get the number of distressed players cached on the local client.
local count = exports['wasabi_ambulance_v2']:getLocalDistressedCount()
Returns: number — Count of distressed players in the local cache.
Stretcher
toggleStretcher
Toggle the stretcher in/out of the nearest ambulance vehicle (within 7.5 units).
exports['wasabi_ambulance']:toggleStretcher()
Returns: Nothing.
deleteStretcherFromVehicle
Remove a stretcher from a specific vehicle entity.
exports['wasabi_ambulance_v2']:deleteStretcherFromVehicle(vehicle)
| Parameter | Type | Required | Description |
|---|---|---|---|
vehicle | number | Yes | The vehicle entity handle. |
Returns: Nothing.
deleteAllStretchers
Delete all active stretchers and resync with the server.
exports['wasabi_ambulance_v2']:deleteAllStretchers()
Returns: Nothing.
isPlayerUsingStretcher
Check if a player is currently using (occupying or moving) a stretcher.
local using = exports['wasabi_ambulance_v2']:isPlayerUsingStretcher(targetID)
| Parameter | Type | Required | Description |
|---|---|---|---|
targetID | number | Yes | The player index (not server ID). |
Returns: boolean | true if the player is occupying or moving a stretcher.
V1 Compatibility:
IsPlayerUsingStretcher(PascalCase) is also available as an alias.
getClosestStretcher
Get the closest stationary stretcher to the local player.
local stretcherData = exports['wasabi_ambulance_v2']:getClosestStretcher(maxDistance?)
| Parameter | Type | Required | Description |
|---|---|---|---|
maxDistance | number | No | Maximum search radius. Default 1000.0. |
Returns: table|nil - Stretcher data table, or nil if none found. The table contains fields such as coords, netID, occupied, moving, inVehicle, etc.
getEquippedStretcherData
Get the data for the stretcher the local player is currently moving.
local data = exports['wasabi_ambulance_v2']:getEquippedStretcherData()
Returns: table|false - Stretcher data table if moving a stretcher, or false.
Facilities
getAllFacilities
Retrieve all facilities and their location data.
local facilities = exports['wasabi_ambulance_v2']:getAllFacilities()
Returns: table[] - Array of facility tables, each containing:
| Field | Type | Description |
|---|---|---|
id | number | Facility ID. |
name | string | Facility display name. |
jobs | table | Allowed job groups. |
locations.center | vector3 | Center coordinates of the facility. |
locations.respawnArea | table | Respawn area data. |
locations.beds | table | Bed locations. |
locations.clockIns | table | Clock-in points. |
locations.checkIns | table | Check-in points. |
locations.elevators | table | Elevator locations. |
locations.personalLockers | table | Locker locations. |
locations.heliGarages | table | Helicopter garage locations. |
Server Exports
Medical
RevivePlayer
Revive a player by their server ID. Clears death state, resets all injuries, and restores health.
exports['wasabi_ambulance_v2']:RevivePlayer(serverId)
| Parameter | Type | Required | Description |
|---|---|---|---|
serverId | number | Yes | The server ID of the player to revive. |
Returns: Nothing.
getPlayerInjuryTotals
Get a breakdown of all injury counts by type for a player.
local totals = exports['wasabi_ambulance_v2']:getPlayerInjuryTotals(playerId)
| Parameter | Type | Required | Description |
|---|---|---|---|
playerId | number | Yes | The server ID of the player. |
Returns: table|nil - A table of injury type counts, or nil if the player has no data.
{
cut = 0,
brokenbone = 0,
blunt = 0,
gunshot = 0,
fist = 0,
taser = 0,
burn = 0
}
Dispatch
These exports are only available when the dispatch type is set to** "internal" **in the config.
addToDistress
Add a player to the distress list and notify all on-duty EMS players.
exports['wasabi_ambulance_v2']:addToDistress(source)
| Parameter | Type | Required | Description |
|---|---|---|---|
source | number | Yes | The server ID of the player in distress. |
Returns: Nothing.
removeFromDistress
Remove a player from the distress list and notify all EMS players.
exports['wasabi_ambulance_v2']:removeFromDistress(source)
| Parameter | Type | Required | Description |
|---|---|---|---|
source | number | Yes | The server ID of the player to remove. |
Returns: Nothing.
isPlayerInDistress
Check if a player is currently in the distress list.
local inDistress = exports['wasabi_ambulance_v2']:isPlayerInDistress(serverId)
| Parameter | Type | Required | Description |
|---|---|---|---|
serverId | number | Yes | The server ID to check. |
Returns: boolean — true if the player is currently in distress.
getDistressedCount
Get the total number of players currently in distress.
local count = exports['wasabi_ambulance_v2']:getDistressedCount()
Returns: number - Total distressed player count.
Facilities
getPlayerBed
Get the bed a player is currently checked into.
local bedData = exports['wasabi_ambulance_v2']:getPlayerBed(playerId)
| Parameter | Type | Required | Description |
|---|---|---|---|
playerId | number | Yes | The server ID of the player. |
Returns: table|nil - Bed data or nil if not checked in (or check-in expired after 10 minutes).
{
facilityId = 1,
bedId = 3,
coords = vector3(...)
}