- Documentation
- Server functions
- getBoneIDs
Function
getBoneIDs
Returns a list of every bone number the server understands (1-8, 21-26, 31-36, 41-44, 51-54). Useful for looping over bones or checking whether a number typed in a command is valid.
Syntax
table getBoneIDs()Returns
A sorted table of bone numbers.
Example
for _, id in ipairs(getBoneIDs()) do
outputServerLog(id .. " = " .. getBoneName(id))
end
See also
getBoneNameReturns the English name of the bone with the given number, e.g. 8 →"Head", 25 →"RightHand", 2 →"Pelvis". Returnsfalsewhen the number does not exist.getPedBonePositionReturns the world position of a chosen skeleton bone of a ped, such as the head or a hand. On the client the position is exact and follows the animation (the bone is read from the game). The server does not know the ped's pose, so it returns an approximation: a fixed bone offset of a standing ped, rotated to match its heading. Bone numbers are the ones fromgetBoneIDs(e.g. 8 head, 25 right hand, 35 left hand); on the client a game bone index also works.