ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. getBodyPartName

Function

getBodyPartName

Server and clientMiscellaneousIdentical to MTA:SA

Returns the English name of a body part by its damage number (3-9): Torso, Ass, Left Arm, Right Arm, Left Leg, Right Leg, Head.

Syntax

string getBodyPartName(int bodyPartID)

Arguments

bodyPartIDint
Body part number.

Returns

The name or false.

Example

addEventHandler("onPlayerDamage", root, function(attacker, weapon, bodypart, loss)
    outputChatBox("Trafienie w: " .. tostring(getBodyPartName(bodypart)), source)
end)

See also