- Documentation
- Shared functions
- getElementHealth
Function
getElementHealth
Returns an element's health: peds 0-100 (up to 176 with full stamina), vehicles 0-1000 (below 250 it burns).
Syntax
float getElementHealth(element theElement)Arguments
theElementelement- A player, ped, vehicle or object.
Returns
Health or false.
Example
addCommandHandler("hp", function(player)
outputChatBox(("Zdrowie: %.0f"):format(getElementHealth(player)), player)
end)