GetPlayerHealth
The player’s health.
Syntax
Section titled “Syntax”GetPlayerHealth(pid)| Parameter | Type | |
|---|---|---|
pid |
number | the player |
Returns
Section titled “Returns”number - 0 .. GetPlayerMaxHealth; -1 when not connected
Example
Section titled “Example”if GetPlayerHealth(pid) < 25 then SendClientMessage(pid, COLOUR_RED, "You are badly hurt.") endSee also
Section titled “See also”GetPlayerMaxHealth · SetPlayerHealth · IsPlayerDead · the Vitals, stats and skills group of the index
