RedM Natives

GET_PED_BONE_COORDS

Gets the position of the specified bone of the specified ped.

Hash0x17C07FC640E86B4E
Runtime nameGetPedBoneCoords
NamespacePED
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x17C07FC640E86B4E

Signature

Vector3 GET_PED_BONE_COORDS(Ped ped, int boneId, float offsetX, float offsetY, float offsetZ);

Parameters

NameTypeDescription
pedPed—
boneIdint—
offsetXfloat—
offsetYfloat—
offsetZfloat—

Returns Vector3

Description

Gets the position of the specified bone of the specified ped.

ped: The ped to get the position of a bone from.
boneId: The ID of the bone to get the position from. This is NOT the index.
offsetX: The X-component of the offset to add to the position relative to the bone's rotation.
offsetY: The Y-component of the offset to add to the position relative to the bone's rotation.
offsetZ: The Z-component of the offset to add to the position relative to the bone's rotation.

Usage

Lua
local retval = GetPedBoneCoords(ped, boneId, offsetX, offsetY, offsetZ)

-- always works, by hash
local retval = Citizen.InvokeNative(0x17C07FC640E86B4E, ped, boneId, offsetX, offsetY, offsetZ, Citizen.ResultAsVector())
JavaScript and C#
JavaScript
const retval = GetPedBoneCoords(ped, boneId, offsetX, offsetY, offsetZ);

// by hash
const retval = Citizen.invokeNative('0x17C07FC640E86B4E', ped, boneId, offsetX + 0.0000001, offsetY + 0.0000001, offsetZ + 0.0000001, Citizen.returnResultAnyway(), Citizen.resultAsVector());
C#
Vector3 retval = Function.Call<Vector3>((Hash)0x17C07FC640E86B4E, ped, boneId, offsetX, offsetY, offsetZ);
  • Float parameters: Lua integers (10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write 10.0 or value + 0.0. The generated JS wrappers add 0.0000001 to non-zero floats for the same reason.

Enums and flags

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.