getEntityBonePostion
GET_ENTITY_BONE_POSTION0x46F8696933A63C9BThe GTA V native GET_ENTITY_BONE_POSTION of the ENTITY namespace, as LS:MP client scripts call it: the global function getEntityBonePostion, in JavaScript and in Lua.
getEntityBonePostion(
entity: Entity,
boneIndex: number
): { x: number, y: number, z: number }getEntityBonePostion(entity: Entity, boneIndex: integer): Vector3Usage
JavaScript
const { x, y, z } = getEntityBonePostion(entity, boneIndex);Lua
local coords = getEntityBonePostion(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.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Gets the world position of the specified bone of the specified entity.
Reference
- Namespace
- Entity ENTITY
- In the game
Vector3 GET_ENTITY_BONE_POSTION(Entity entity, int boneIndex)- Hash
0x46F8696933A63C9B- Introduced
- Game build 877 legacy numbering
- Formerly
_GET_WORLD_POSITION_OF_ENTITY_BONE_2_GET_ENTITY_BONE_POSITION_2