Client Side

Here you will find the list of usable exports for Ambulance Job, you can use them if you have basic or advanced programming knowledge, we do not recommend using these if you do not have such knowledge.


Revive Player

Use one of following events to revive player

-- Any of these events will work :)
TriggerEvent('p_ambulancejob/client/death/revive')
TriggerEvent('esx_ambulancejob:revive')
TriggerEvent('hospital:client:RevivePlayer')
TriggerEvent('hospital:client:Revive')

Kill Player

Use one of following events to kill player

-- Any of these events will work :)
TriggerEvent('p_ambulancejob/client/death/kill')
TriggerEvent('hospital:client:KillPlayer')

openDispatch

Use following export to open dispatch menu

openDispatch

Use following export to open dispatch menu


getDispatchAlerts

Use following export to get all active alerts on dispatch

Return:

  • alerts: table {id: number, player: number, code: string, title: string, message: string, coords: vec3, expire: number, blip: {sprite: number, scale: number, color: number}}


Send Alert

Use following event to send alert to EMS

code: string

  • Alert Code

title: string

  • Alert Title

message: string

  • Alert Message

coords: vec3

  • Coords of alert

expire: number

  • Time in seconds to expire alert

blip: {sprite: number, color: number, scale: number, pulse: boolean}


isPlayerOnBed

Use following export to check if player is currently on some hospital bed

playerId: number

  • Existing player server id

Return:

  • result: boolean


getBleedingValue

Use following export to check player current bleeding value

Return:

  • result: number


stopBleeding

Use following export to stop player bleeding


addBleeding

Use following export to add value to player bleeding

value: number

  • Value to add


removeBleeding

Use following export to remove value from player bleeding

value: number

  • Value to remove


isCrutchEnabled

Use following export to check if player has currently enabled crutch

Return:

  • result: boolean


getDeathInfo

Use following export to check player death info

Return:

  • result: {isDead: boolean, stage: "death" | "bleeding" | "recovering" | "none"}


isDead / dead

Use following state bag to check if player is dead


onDeathStateChange

You can use this event handler to follow players death state

  • deathType: "death" | "bleeding" | "recovering" | "none"

  • deathData: {victimCoords: vec3, killerCoords: vec3 | nil, distance: number | nil, killer: number | nil, cause: number, weapon: number, weaponLabel: string | nil}


isGpsActive

Use following export to check if player gps is active

Return:

  • result: boolean


Check Pulse

Use following statebags to check player pulse


resetPulse

Use following export to reset player pulse


addPulse

Use following export to add value to player pulse

value: number

  • Value to add


resetTemperature

Use following export to reset player temperature


addTemperature

Use following export to add value to player temperature

value: number

  • Value to add


assignCrutch

Use following export to assign crutch for player for some time


openRespawnMenu

Use following export to open respawn menu while player is dead


distressAlert

Use following export to send distress alert

Last updated