M MY Multiplayer: Wiki
Side
Kind

setElementBoneScale

Client

Changes the scale of a ped's or object's bone. The change applies on this client only.

bool setElementBoneScale(ped|object element, int|string bone, float x, y, z)

Parameters

NameTypeDescription
elementped|objectThe ped, player or object. An object needs a model with a skeleton or a node tree.
boneint|stringThe bone. On a ped: an MTA bone id, a rig bone's tag or its name. On an object: a node's name or a bone's tag.
x, y, zfloatThe scale on each axis, from 0 to 10: three numbers, one number for all three axes, or one vec3. 1 is the original size.

Returns

true if it was changed. false if the element is streamed out, the ped cannot scale that bone or the object is animated.

Whatever is attached to the bone follows it.

Example

addCommandHandler("bighead", function()
    setElementBoneScale(localPlayer, 5, 2)
end)
NoteRaises an error if the element has no such bone or a scale is outside 0 to 10. While the element is streamed out, it returns false.

See also