ADD_ROPE
There are 19 types of rope, from type = 0 to type = 18 Rope definitions are stored in ropedata.xml Rope types 0, 15 and 18 have proper physics for hanging objects (taut, do not sag, small to medium diameter, good aspect for a rope)
Hash
0xE832D760399EB220Runtime name
AddRopeNamespacePHYSICS
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0xE832D760399EB220Signature
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);Parameters
| Name | Type | Description |
|---|---|---|
x | float | — |
y | float | — |
z | float | — |
rotX | float | — |
rotY | float | — |
rotZ | float | — |
length | float | — |
ropeType | int | — |
maxLength | float | — |
minLength | float | — |
p10 | float | — |
p11 | BOOL | — |
p12 | BOOL | — |
rigid | BOOL | — |
p14 | float | — |
breakWhenShot | BOOL | — |
unkPtr | Any* | — |
p17 | BOOL | — |
Returns int
Description
There are 19 types of rope, from type = 0 to type = 18
Rope definitions are stored in ropedata.xml
Rope types 0, 15 and 18 have proper physics for hanging objects (taut, do not sag, small to medium diameter, good aspect for a rope)
Usage
local retval, unkPtr = AddRope(x, y, z, rotX, rotY, rotZ, length, ropeType, maxLength, minLength, p10, p11, p12, rigid, p14, breakWhenShot, p17)
-- always works, by hash
local retval, unkPtr = Citizen.InvokeNative(0xE832D760399EB220, x, y, z, rotX, rotY, rotZ, length, ropeType, maxLength, minLength, p10, p11, p12, rigid, p14, breakWhenShot, Citizen.PointerValueInt(), p17, Citizen.ResultAsInteger())JavaScript and C#
const [retval, unkPtr] = AddRope(x, y, z, rotX, rotY, rotZ, length, ropeType, maxLength, minLength, p10, p11, p12, rigid, p14, breakWhenShot, p17);
// by hash
const [retval, unkPtr] = Citizen.invokeNative('0xE832D760399EB220', x + 0.0000001, y + 0.0000001, z + 0.0000001, rotX + 0.0000001, rotY + 0.0000001, rotZ + 0.0000001, length + 0.0000001, ropeType, maxLength + 0.0000001, minLength + 0.0000001, p10 + 0.0000001, p11, p12, rigid, p14 + 0.0000001, breakWhenShot, Citizen.pointerValueInt(), p17, Citizen.returnResultAnyway(), Citizen.resultAsInteger());var unkPtr = new OutputArgument();
int retval = Function.Call<int>((Hash)0xE832D760399EB220, x, y, z, rotX, rotY, rotZ, length, ropeType, maxLength, minLength, p10, p11, p12, rigid, p14, breakWhenShot, unkPtr, p17);
// unkPtr.GetResult<int>()- Float parameters: Lua integers (
10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to non-zero floats for the same reason. - Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.
Any*arguments are often structs. Build them with a DataView buffer and pass it with:Buffer()— see the examples and notes below.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.