getEntityBoneObjectPostion
GET_ENTITY_BONE_OBJECT_POSTION0xCF1247CC86961FD6The GTA V native GET_ENTITY_BONE_OBJECT_POSTION of the ENTITY namespace, as LS:MP client scripts call it: the global function getEntityBoneObjectPostion, in JavaScript and in Lua.
getEntityBoneObjectPostion(
entity: Entity,
boneIndex: number
): { x: number, y: number, z: number }getEntityBoneObjectPostion(entity: Entity, boneIndex: integer): Vector3Usage
JavaScript
const { x, y, z } = getEntityBoneObjectPostion(entity, boneIndex);Lua
local coords = getEntityBoneObjectPostion(entity, boneIndex)
-- coords.x, coords.y, coords.zParameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
entity | Entity | number | integer |
boneIndex | int | number | integer |
Returns
Vector3 JavaScript { x: number, y: number, z: number }, Lua Vector3A 3D vector. JavaScript gets a plain { x, y, z } object; Lua gets a real Vector3, with .x .y .z and arithmetic. As an argument, one vector fills three consecutive coordinates.
Reference
- Namespace
- Entity ENTITY
- In the game
Vector3 GET_ENTITY_BONE_OBJECT_POSTION(Entity entity, int boneIndex)- Hash
0xCF1247CC86961FD6- Introduced
- Game build 2802 legacy numbering