πisDead function
An example function to check if the player is dead in other scripts.
function isDead()
local playerId = GetPlayerServerId(PlayerId())
local ambulanceData = exports.osp_ambulance:GetAmbulanceData(playerId)
if ambulanceData.isDead or ambulanceData.inLastStand then
return true
end
return false
endlocal isDead = exports["osp_ambulance"]:isDead()Last updated