ADD_ROPE
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
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 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | x | float |
| 2 | y | float |
| 3 | z | float |
| 4 | rotX | float |
| 5 | rotY | float |
| 6 | rotZ | float |
| 7 | length | float |
| 8 | ropeType | int |
| 9 | maxLength | float |
| 10 | minLength | float |
| 11 | p10 | float |
| 12 | p11 | BOOL |
| 13 | p12 | BOOL |
| 14 | rigid | BOOL |
| 15 | p14 | float |
| 16 | breakWhenShot | BOOL |
| 17 | unkPtr | Any* (out pointer) |
| 18 | p17 | BOOL |
Facts
| 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.
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)// 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)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>();Related PHYSICS natives
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.