Skip to content

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.

GetPlayerInjuries(pid)
Parameter Type
pid number the player

table - a list of body part ids

local names = {}
for _, part in ipairs(GetPlayerInjuries(pid)) do names[#names + 1] = GetBodyPartName(part) end
if #names > 0 then SendClientMessage(pid, COLOUR_RED, "injured: " .. table.concat(names, ", ")) end

IsPlayerInjured · GetBodyPartName · OnPlayerInjury · HealPlayer · the Vitals, stats and skills group of the index