Browse docs
Client Events
Client Events
These events can be triggered from other resources to interact with the ambulance job on the client side.
| Event | Description |
|---|---|
sky_ambulancejob:revive | Revive the local player. |
sky_ambulancejob:killPlayer | Kill the local player with an optional custom death reason. |
sky_ambulancejob:deathscreen:started | Fired when the death screen opens. |
sky_ambulancejob:deathscreen:closed | Fired when the death screen closes. |
sky_ambulancejob:deathStateChanged | Publishes a complete local death-state snapshot for external death-screen integrations. |
sky_ambulancejob:openDiagnose | Open the medical diagnosis UI. |
sky_ambulancejob:carry:start | Start carrying a patient. |
sky_ambulancejob:carry:stop | Stop carrying a patient. |
sky_ambulancejob:revive
Revives the local player, clearing the death state and restoring control.
TriggerEvent("sky_ambulancejob:revive")
sky_ambulancejob:killPlayer
Kills the local player through the normal ambulance death flow. Pass an optional custom reason to show it on the death screen and in the paramedic diagnosis UI.
TriggerEvent("sky_ambulancejob:killPlayer", "Overdose")
From a server resource, target the player's server ID:
TriggerClientEvent("sky_ambulancejob:killPlayer", playerId, "Overdose")
Server resources can also use exports["sky_ambulancejob"]:killPlayer(playerId, "Overdose"), which checks the target and reason before sending the event and returns whether it was sent.
The optional customReason must be valid UTF-8 with 1–120 Unicode characters after trimming leading and trailing whitespace, and must not contain ASCII control characters. Supply translated display text from your integration's locale. Invalid text rejects the request without killing the player. Omitting the reason or passing nil preserves the existing suicide behavior and forced-death injury rules.
The event does not return an acceptance result. Client integrations that need one can use killPlayer(customReason?), which returns a boolean.
sky_ambulancejob:deathscreen:started
Fired when the death screen UI is shown. Useful for other resources that need to react to player death (e.g., disabling HUD elements).
AddEventHandler("sky_ambulancejob:deathscreen:started", function()
-- Player is now on the death screen
end)
sky_ambulancejob:deathscreen:closed
Fired when the death screen UI is closed (player revived or respawned). Useful for re-enabling systems that were paused during death.
AddEventHandler("sky_ambulancejob:deathscreen:closed", function()
-- Player is alive again
end)
sky_ambulancejob:deathStateChanged
Publishes the complete local death-state snapshot, including the lifecycle phase, bleed-out timer, respawn availability, dispatch availability, AI Medic state, and detected cause. External death screens should replace their current UI state with every snapshot instead of merging partial state.
AddEventHandler("sky_ambulancejob:deathStateChanged", function(state)
if state.dead then
-- Show or update the external death screen.
else
-- Hide the external death screen.
end
end)
See External Death Screen for the complete state contract and supported actions.
sky_ambulancejob:openDiagnose
Opens the medical diagnosis interface for the local player, showing injury details and treatment options.
TriggerEvent("sky_ambulancejob:openDiagnose")
sky_ambulancejob:carry:start
Starts carrying the nearest patient. The carry system handles animation, movement restrictions, and synchronization.
TriggerEvent("sky_ambulancejob:carry:start")
sky_ambulancejob:carry:stop
Stops carrying the current patient and releases them.
TriggerEvent("sky_ambulancejob:carry:stop")
Support
Need help? Our support team is always ready to assist
Join Discord