Skip to content

GetBodyPartName

The name of a body part id.

GetBodyPartName(part)
Parameter Type
part number 1 head, 2 torso, 3 left arm, 4 right arm, 5 left leg, 6 right leg

string - "head", "torso", "arm_left", "arm_right", "leg_left", "leg_right"; "" for anything else

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

GetPlayerInjuries · OnPlayerDamage · the Vitals, stats and skills group of the index