- Documentation
- Client functions
- getPedBoneName
Function
getPedBoneName
Returns the name of the game skeleton bone with the given index (e.g. "Head", "R_Hand"). The index is the bone's position in the Definitive Edition skeleton (0 to getPedBoneCount() - 1), not a number from getBoneIDs.
Syntax
string getPedBoneName(int index)Arguments
indexint- Game bone index, from 0.
Returns
The bone name, or false/nil for a wrong index.
Example
outputChatBox(tostring(getPedBoneName(0)))
See also
getPedBoneCountReturns the number of skeleton bones a ped has in this version of the game (the Definitive Edition skeleton has more than the classic one). Returns 0 when the game has not shown any ped yet. Together withgetPedBoneNameit lets you list every bone.getPedBoneIndexByNameConverts a game skeleton bone name to its index, which you can then pass togetPedBonePositionand similar functions. Some names repeat in the skeleton (there are e.g. two "Spine" bones); the second argument picks which occurrence to return.