GetPlayerInjuries
The player’s injured body parts.
A list of body parts, BODY_PART_HEAD .. BODY_PART_LEG_RIGHT (1 .. 6); {} when whole. An injured arm makes the
swings weaker and costlier, an injured head or torso halves the stamina regeneration. A hit of at least
[combat] injury_threshold injures the part it struck; OnPlayerInjury says so.
Syntax
Section titled “Syntax”GetPlayerInjuries(pid)| Parameter | Type | |
|---|---|---|
pid |
number | the player |
Returns
Section titled “Returns”table - a list of body part ids
Example
Section titled “Example”local names = {}for _, part in ipairs(GetPlayerInjuries(pid)) do names[#names + 1] = GetBodyPartName(part) endif #names > 0 then SendClientMessage(pid, COLOUR_RED, "injured: " .. table.concat(names, ", ")) endSee also
Section titled “See also”IsPlayerInjured · GetBodyPartName · OnPlayerInjury · HealPlayer · the Vitals, stats and skills group of the index
