Skip to main content

Events

Events to listen to on the client and/or server to utilize with third party integrations with Wasabi Ambulance Job V2 (wasabi_ambulance_v2).

Client Events


wasabi_ambulance:playerSpawned

Fired after the player's medical data has been loaded and applied.

AddEventHandler('wasabi_ambulance:playerSpawned', function()
-- Player medical data is loaded and ready
end)
wasabi_ambulance:playerDied

Fired when the local player enters the full death state.

AddEventHandler('wasabi_ambulance:playerDied', function()
-- Player has died
end)
wasabi_ambulance:PlayerDisarmed

Fired when the player's weapon is removed upon entering last stand / death.

AddEventHandler('wasabi_ambulance:PlayerDisarmed', function()
-- Player's weapon has been removed
end)
wasabi_ambulance:PlayerLoaded

Fired when the player is fully loaded into the ambulance system. Triggered once per player load (or resource restart).

-- Client side
AddEventHandler('wasabi_ambulance:PlayerLoaded', function(player?)
-- player table may contain: name, groups, duty, loaded
end)
wasabi_ambulance:Client:distressSignal

Fired on all clients when a player sends a distress signal (EMS ping). Intended for third-party dispatch system integration.

RegisterNetEvent('wasabi_ambulance:Client:distressSignal', function(dispatchData)
-- dispatchData = {
-- source = number, -- Server ID of the player in distress
-- name = string, -- Player name
-- gender = number, -- Player gender
-- coords = vector3, -- Player coordinates
-- streetName = string, -- Street name at player location
-- timestamp = number -- os.time() timestamp
-- }
end)
wasabi_ambulance:Client:OnLastStand

Fired on the local client when the player enters last stand (downed) state.

AddEventHandler('wasabi_ambulance:Client:OnLastStand', function(deathData)
-- deathData = {
-- cause = number?, -- Weapon/cause hash
-- killer = number?, -- Server ID of the killer
-- }
end)
wasabi_ambulance:Client:OnDeath

Fired on the local client when the player enters the fully dead state.

AddEventHandler('wasabi_ambulance:Client:OnDeath', function(deathData)
-- deathData = {
-- cause = number?, -- Weapon/cause hash
-- killer = number?, -- Server ID of the killer
-- }
end)
wasabi_ambulance:Client:OnRevive

Fired on the local client when the player is revived.

AddEventHandler('wasabi_ambulance:Client:OnRevive', function()
-- No parameters
end)
wasabi_ambulance:Client:Listeners:OnRespawn

Fired on the local client when the player is revived.

AddEventHandler('wasabi_ambulance:Client:Listeners:OnRespawn', function(facilityId, coords)
-- facilityId = number? -- The facility ID where the player respawned
-- coords = vector3 -- The respawn coordinates
end)
wasabi_ambulance:Client:Listeners:OnFacilityHeal

Fired on the local client when the player is revived.

AddEventHandler('wasabi_ambulance:Client:Listeners:OnFacilityHeal', function(facilityId, facilityName)
-- facilityId = number -- The facility ID where the player respawned
-- facilityName = string -- The facility name
end)

Server Events


wasabi_ambulance:PlayerLoaded

Fired on the server when a player is fully loaded into the ambulance system.

AddEventHandler('wasabi_ambulance:PlayerLoaded', function(playerId)
-- playerId = number (server ID)
end)
wasabi_ambulance:Server:distressSignal

Fired on the server when a player sends a distress signal. Intended for third-party dispatch system integration.

AddEventHandler('wasabi_ambulance:Server:distressSignal', function(dispatchData)
-- dispatchData = {
-- source = number, -- Server ID of the player in distress
-- name = string, -- Player name
-- gender = number, -- Player gender
-- coords = vector3, -- Player coordinates
-- streetName = string, -- Street name at player location
-- timestamp = number -- os.time() timestamp
-- }
end)