Skip to content

OnPlayerInjury

A hit injured one of the player’s body parts.

A hit of at least [combat] injury_threshold injures the part it struck. An injured arm makes the player’s swings weaker and costlier; an injured head or torso halves the stamina regeneration. HealPlayer and the respawn heal it.

function OnPlayerInjury(pid, attacker, part)
-- ...
end
Parameter Type
pid number the victim
attacker number who struck; -1 = nobody
part number the body part, 1 .. 6

nothing

function OnPlayerInjury(pid, attacker, part)
SendClientMessage(pid, COLOUR_RED, "your " .. GetBodyPartName(part):gsub("_", " ") .. " is injured")
end

OnPlayerDamage · GetPlayerInjuries · GetBodyPartName · the Combat group of the index