# CAMERA::ATTACH_CAM_TO_PED_BONE

- **Hash:** `0xDFC1E4A44C0324CA`
- **Namespace:** CAMERA
- **Runtime name (Lua/JS):** `AttachCamToPedBone`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/CAMERA/ATTACH_CAM_TO_PED_BONE

## Signature

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

## Parameters

- `cam` (`Cam`)
- `ped` (`Ped`)
- `boneIndex` (`int`)
- `x` (`float`)
- `y` (`float`)
- `z` (`float`)
- `heading` (`BOOL`)

## Returns

`void`

## Description

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

## Usage

### Lua

```lua
AttachCamToPedBone(cam, ped, boneIndex, x, y, z, heading)

-- always available, by hash
Citizen.InvokeNative(0xDFC1E4A44C0324CA, cam, ped, boneIndex, x, y, z, heading)
```

### JavaScript

```js
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#

```csharp
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.

## Related enums

- [eAnimBoneTag](https://natives.borderlinerp.com/enums/eAnimBoneTag.md) — 911 values

*Sources: alloc8or RDR3 NativeDB.*
