# ENTITY::ATTACH_ENTITY_TO_ENTITY_PHYSICALLY

- **Hash:** `0xB629A43CA1643481`
- **Namespace:** ENTITY
- **Runtime name (Lua/JS):** `AttachEntityToEntityPhysically`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** named only
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/ENTITY/ATTACH_ENTITY_TO_ENTITY_PHYSICALLY

## Signature

```c
void ATTACH_ENTITY_TO_ENTITY_PHYSICALLY(Entity entity1, Entity entity2, int p2, int boneIndex, float offsetX, float offsetY, float offsetZ, float p7, float p8, float p9, float p10, float p11, float p12, float p13, BOOL p14, BOOL p15, BOOL p16, BOOL p17, int p18, BOOL p19, float p20, float p21);
```

## Parameters

- `entity1` (`Entity`)
- `entity2` (`Entity`)
- `p2` (`int`)
- `boneIndex` (`int`)
- `offsetX` (`float`)
- `offsetY` (`float`)
- `offsetZ` (`float`)
- `p7` (`float`)
- `p8` (`float`)
- `p9` (`float`)
- `p10` (`float`)
- `p11` (`float`)
- `p12` (`float`)
- `p13` (`float`)
- `p14` (`BOOL`)
- `p15` (`BOOL`)
- `p16` (`BOOL`)
- `p17` (`BOOL`)
- `p18` (`int`)
- `p19` (`BOOL`)
- `p20` (`float`)
- `p21` (`float`)

## Returns

`void`

## Usage

### Lua

```lua
AttachEntityToEntityPhysically(entity1, entity2, p2, boneIndex, offsetX, offsetY, offsetZ, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21)

-- always available, by hash
Citizen.InvokeNative(0xB629A43CA1643481, entity1, entity2, p2, boneIndex, offsetX, offsetY, offsetZ, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21)
```

### JavaScript

```js
AttachEntityToEntityPhysically(entity1, entity2, p2, boneIndex, offsetX, offsetY, offsetZ, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21);

// by hash
Citizen.invokeNative('0xB629A43CA1643481', entity1, entity2, p2, boneIndex, offsetX + 0.0000001, offsetY + 0.0000001, offsetZ + 0.0000001, p7 + 0.0000001, p8 + 0.0000001, p9 + 0.0000001, p10 + 0.0000001, p11 + 0.0000001, p12 + 0.0000001, p13 + 0.0000001, p14, p15, p16, p17, p18, p19, p20 + 0.0000001, p21 + 0.0000001);
```

### C#

```csharp
Function.Call((Hash)0xB629A43CA1643481, entity1, entity2, p2, boneIndex, offsetX, offsetY, offsetZ, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21);
```

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

*Sources: alloc8or RDR3 NativeDB.*
