RedM Natives

ATTACH_CAM_TO_PED_BONE

Hash0xDFC1E4A44C0324CA
Runtime nameAttachCamToPedBone
NamespaceCAMERA
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x61A3DBA14AB7F411

Signature

void ATTACH_CAM_TO_PED_BONE(Cam cam, Ped ped, int boneIndex, float x, float y, float z, BOOL heading);

Parameters

NameTypeDescription
camCam—
pedPed—
boneIndexint—
xfloat—
yfloat—
zfloat—
headingBOOL—

Returns void

Description

boneIndex: https://github.com/femga/rdr3_discoveries/tree/master/boneNames

Usage

Lua
AttachCamToPedBone(cam, ped, boneIndex, x, y, z, heading)

-- always works, by hash
Citizen.InvokeNative(0xDFC1E4A44C0324CA, cam, ped, boneIndex, x, y, z, heading)
JavaScript and C#
JavaScript
AttachCamToPedBone(cam, ped, boneIndex, x, y, z, heading);

// by hash
Citizen.invokeNative('0xDFC1E4A44C0324CA', cam, ped, boneIndex, x + 0.0000001, y + 0.0000001, z + 0.0000001, heading);
C#
Function.Call((Hash)0xDFC1E4A44C0324CA, cam, ped, boneIndex, x, y, z, heading);
  • 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.