Skip to main content

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?)
ParameterTypeRequiredDescription
serverIdnumberNoThe 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?)
ParameterTypeRequiredDescription
targetPednumberYesThe ped entity handle to inspect.
skipCambooleanNoIf true, skips the cinematic inspection camera. Default false.
viewOnlybooleanNoIf 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)
ParameterTypeRequiredDescription
vehiclenumberYesThe 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)
ParameterTypeRequiredDescription
targetIDnumberYesThe 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?)
ParameterTypeRequiredDescription
maxDistancenumberNoMaximum 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:

FieldTypeDescription
idnumberFacility ID.
namestringFacility display name.
jobstableAllowed job groups.
locations.centervector3Center coordinates of the facility.
locations.respawnAreatableRespawn area data.
locations.bedstableBed locations.
locations.clockInstableClock-in points.
locations.checkInstableCheck-in points.
locations.elevatorstableElevator locations.
locations.personalLockerstableLocker locations.
locations.heliGaragestableHelicopter 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)
ParameterTypeRequiredDescription
serverIdnumberYesThe 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)
ParameterTypeRequiredDescription
playerIdnumberYesThe 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)
ParameterTypeRequiredDescription
sourcenumberYesThe 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)
ParameterTypeRequiredDescription
sourcenumberYesThe 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)
ParameterTypeRequiredDescription
serverIdnumberYesThe server ID to check.

Returns: booleantrue 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)
ParameterTypeRequiredDescription
playerIdnumberYesThe 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(...)
}