The Lab
PHYSICS native

ADD_ROPE

returns int18 paramsbuild 1207

Creates a rope at the given position and rotation with the given length, ropeType and length limits, and returns its rope id. Many of the flag parameters are poorly documented.

Attach entities afterwards with ATTACH_ENTITIES_TO_ROPE and remove it with DELETE_ROPE.

Signature

C
int ADD_ROPE(float x, float y, float z, float rotX, float rotY, float rotZ, float length, int ropeType, float maxLength, float minLength, float p10, BOOL p11, BOOL p12, BOOL rigid, float p14, BOOL breakWhenShot, Any* unkPtr, BOOL p17); // 0xE832D760399EB220 b1207

Parameters

#NameType
1xfloat
2yfloat
3zfloat
4rotXfloat
5rotYfloat
6rotZfloat
7lengthfloat
8ropeTypeint
9maxLengthfloat
10minLengthfloat
11p10float
12p11BOOL
13p12BOOL
14rigidBOOL
15p14float
16breakWhenShotBOOL
17unkPtrAny* (out pointer)
18p17BOOL

Facts

Facts about ADD_ROPE
Name
ADD_ROPE
Hash
0xE832D760399EB220
Namespace
Returns
int
Game build
1207

Examples

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

Lua
local result, unkPtr = Citizen.InvokeNative(0xE832D760399EB220, -- ADD_ROPE
  0.0, -- float x
  0.0, -- float y
  0.0, -- float z
  0.0, -- float rotX
  0.0, -- float rotY
  0.0, -- float rotZ
  0.0, -- float length
  0, -- int ropeType
  0.0, -- float maxLength
  0.0, -- float minLength
  0.0, -- float p10
  false, -- BOOL p11
  false, -- BOOL p12
  false, -- BOOL rigid
  0.0, -- float p14
  false, -- BOOL breakWhenShot
  Citizen.PointerValueInt(), -- Any* unkPtr
  false, -- BOOL p17
  Citizen.ResultAsInteger()
)
print(result, unkPtr)
JavaScript
// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const [result, unkPtr] = Citizen.invokeNative("0xE832D760399EB220", // ADD_ROPE
  0.0, // float x
  0.0, // float y
  0.0, // float z
  0.0, // float rotX
  0.0, // float rotY
  0.0, // float rotZ
  0.0, // float length
  0, // int ropeType
  0.0, // float maxLength
  0.0, // float minLength
  0.0, // float p10
  false, // BOOL p11
  false, // BOOL p12
  false, // BOOL rigid
  0.0, // float p14
  false, // BOOL breakWhenShot
  Citizen.pointerValueInt(), // Any* unkPtr
  false, // BOOL p17
  Citizen.resultAsInteger()
);
console.log(result, unkPtr)
C#
var unkPtrArg = new OutputArgument();
int result = Function.Call<int>((Hash)0xE832D760399EB220, // ADD_ROPE
  0.0f, // float x
  0.0f, // float y
  0.0f, // float z
  0.0f, // float rotX
  0.0f, // float rotY
  0.0f, // float rotZ
  0.0f, // float length
  0, // int ropeType
  0.0f, // float maxLength
  0.0f, // float minLength
  0.0f, // float p10
  false, // BOOL p11
  false, // BOOL p12
  false, // BOOL rigid
  0.0f, // float p14
  false, // BOOL breakWhenShot
  unkPtrArg, // Any* unkPtr
  false // BOOL p17
);
int unkPtr = unkPtrArg.GetResult<int>();
All PHYSICS natives

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