âĄExports & Events
EXPORTS
How to check if a player is dead
exports.ars_ambulancejob:isDead() -- returns true if dead
LocalPlayer.state.dead -- returns true if dead
local data = lib.callback.await('ars_ambulancejob:getData', false, targetServerId) local isDead = data.status.isDead
Usage example
RegisterCommand("test", function(source, args, rawCommand)
local isDead = LocalPlayer.state.dead
if isDead then
print("player is dead")
else
print("alive")
end
end)
How to open distress call dialog
exports.ars_ambulancejob:createDistressCall()
Usage example
RegisterCommand("test2", function(source, args, rawCommand)
exports.ars_ambulancejob:createDistressCall()
end)
How to open distress calls menu
exports.ars_ambulancejob:openDistressCalls()
Usage example
RegisterCommand("test3", function(source, args, rawCommand)
exports.ars_ambulancejob:openDistressCalls()
end)
EVENTS
How to use heal event (client)
TriggerEvent('ars_ambulancejob:healPlayer', {revive = true}) -- to revive player
TriggerEvent('ars_ambulancejob:healPlayer', {heal = true}) -- to heal player
TriggerEvent('ars_ambulancejob:healPlayer', {injury = true, bone = "head" }) -- to heal injury of player
Usage example
RegisterCommand("test4", function(source, args, rawCommand)
TriggerEvent('ars_ambulancejob:healPlayer', {revive = true}) -- to revive player
end)
RegisterCommand("test5", function(source, args, rawCommand)
TriggerEvent('ars_ambulancejob:healPlayer', {heal = true}) -- to heal player
end)
RegisterCommand("test6", function(source, args, rawCommand)
TriggerEvent('ars_ambulancejob:healPlayer', {injury = true, bone = "head" }) -- to heal injury of player
end)
Last updated