M MY Multiplayer: Wiki
Side
Kind

getElementBoneScale

Client

Returns the scale of a ped's or object's bone.

vec3|false getElementBoneScale(ped|object element, int|string bone)

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.

Returns

A vec3 with the scale on each axis, 1 when unscaled, or false if the element is streamed out.

Example

local scale = getElementBoneScale(localPlayer, 5)
if scale and scale.x ~= 1 then
    outputDebugString("The head is scaled")
end
NoteRaises an error if the element has no such bone. While the element is streamed out, it returns false.

See also