The Lab
ENTITY native

ATTACH_ENTITY_TO_ENTITY

returns void17 paramsbuild 1207

Attaches entity1 to entity2 at the given bone, offset and rotation, with options for collision and soft pinning.

Use GET_ENTITY_BONE_INDEX_BY_NAME or GET_PED_BONE_INDEX to find the bone index.

Signature

C
void ATTACH_ENTITY_TO_ENTITY(Entity entity1, Entity entity2, int boneIndex, float xPos, float yPos, float zPos, float xRot, float yRot, float zRot, BOOL p9, BOOL useSoftPinning, BOOL collision, BOOL isPed, int vertexIndex, BOOL fixedRot, BOOL p15, BOOL p16); // 0x6B9BBD38AB0796DF b1207

Parameters

#NameType
1entity1Entity
2entity2Entity
3boneIndexint
4xPosfloat
5yPosfloat
6zPosfloat
7xRotfloat
8yRotfloat
9zRotfloat
10p9BOOL
11useSoftPinningBOOL
12collisionBOOL
13isPedBOOL
14vertexIndexint
15fixedRotBOOL
16p15BOOL
17p16BOOL

Facts

Facts about ATTACH_ENTITY_TO_ENTITY
Name
ATTACH_ENTITY_TO_ENTITY
Hash
0x6B9BBD38AB0796DF
Namespace
Returns
void
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
Citizen.InvokeNative(0x6B9BBD38AB0796DF, -- ATTACH_ENTITY_TO_ENTITY
  PlayerPedId(), -- Entity entity1
  PlayerPedId(), -- Entity entity2
  0, -- int boneIndex
  0.0, -- float xPos
  0.0, -- float yPos
  0.0, -- float zPos
  0.0, -- float xRot
  0.0, -- float yRot
  0.0, -- float zRot
  false, -- BOOL p9
  false, -- BOOL useSoftPinning
  false, -- BOOL collision
  false, -- BOOL isPed
  0, -- int vertexIndex
  false, -- BOOL fixedRot
  false, -- BOOL p15
  false -- BOOL p16
)
JavaScript
// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
Citizen.invokeNative("0x6B9BBD38AB0796DF", // ATTACH_ENTITY_TO_ENTITY
  PlayerPedId(), // Entity entity1
  PlayerPedId(), // Entity entity2
  0, // int boneIndex
  0.0, // float xPos
  0.0, // float yPos
  0.0, // float zPos
  0.0, // float xRot
  0.0, // float yRot
  0.0, // float zRot
  false, // BOOL p9
  false, // BOOL useSoftPinning
  false, // BOOL collision
  false, // BOOL isPed
  0, // int vertexIndex
  false, // BOOL fixedRot
  false, // BOOL p15
  false // BOOL p16
);
C#
Function.Call((Hash)0x6B9BBD38AB0796DF, // ATTACH_ENTITY_TO_ENTITY
  API.PlayerPedId(), // Entity entity1
  API.PlayerPedId(), // Entity entity2
  0, // int boneIndex
  0.0f, // float xPos
  0.0f, // float yPos
  0.0f, // float zPos
  0.0f, // float xRot
  0.0f, // float yRot
  0.0f, // float zRot
  false, // BOOL p9
  false, // BOOL useSoftPinning
  false, // BOOL collision
  false, // BOOL isPed
  0, // int vertexIndex
  false, // BOOL fixedRot
  false, // BOOL p15
  false // BOOL p16
);
All ENTITY natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.