- Documentation
- Shared functions
- getElementBoneAttachment
Function
getElementBoneAttachment
Returns the data of an element attached to a ped's bone.
Syntax
mixed getElementBoneAttachment(element theElement)Arguments
theElementelement- The element.
Returns
ped, bone, x, y, z, rx, ry, rz, follow, or false. follow tells whether the element follows the bone (see attachElementToBone).
Example
local ped, bone = getElementBoneAttachment(hat)
if ped then
outputServerLog("Czapka na kości " .. bone)
end
See also
attachElementToBoneAttaches an element (e.g. an object) to a ped's bone, with an offset and rotation. The element moves with the bone, e.g. a hat with the head or a weapon in a hand. Bone numbers are the same as ingetBoneIDs(e.g. 1 pelvis, 8 head, 25 right hand, 35 left hand).isElementAttachedToBoneChecks whether an element is attached to a ped's bone.