getElementBoneScale
Client
Returns the scale of a ped's or object's bone.
vec3|false getElementBoneScale(ped|object element, int|string bone)
Parameters
| Name | Type | Description |
|---|---|---|
| element | ped|object | The ped, player or object. An object needs a model with a skeleton or a node tree. |
| bone | int|string | The 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")
endNoteRaises an error if the element has no such bone. While the element is streamed out, it returns
false.