{"hash":"0xE832D760399EB220","ns":"PHYSICS","name":"ADD_ROPE","slug":"ADD_ROPE","official":true,"named":true,"luaName":"AddRope","game":"rdr3","apiset":"client","returnType":"int","params":[{"name":"x","type":"float"},{"name":"y","type":"float"},{"name":"z","type":"float"},{"name":"rotX","type":"float"},{"name":"rotY","type":"float"},{"name":"rotZ","type":"float"},{"name":"length","type":"float"},{"name":"ropeType","type":"int"},{"name":"maxLength","type":"float"},{"name":"minLength","type":"float"},{"name":"p10","type":"float"},{"name":"p11","type":"BOOL"},{"name":"p12","type":"BOOL"},{"name":"rigid","type":"BOOL"},{"name":"p14","type":"float"},{"name":"breakWhenShot","type":"BOOL"},{"name":"unkPtr","type":"Any*"},{"name":"p17","type":"BOOL"}],"summary":"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)","descriptions":[{"source":"alloc8or","format":"text","body":"There are 19 types of rope, from type = 0 to type = 18\nRope definitions are stored in ropedata.xml\nRope types 0, 15 and 18 have proper physics for hanging objects (taut, do not sag, small to medium diameter, good aspect for a rope)"}],"examples":[],"aliases":[],"enums":[],"related":[],"build":"1207","gtaHash":"0xE832D760399EB220","gtaJhash":"0xA592EC74","sources":["alloc8or"],"doc":2,"url":"https://natives.borderlinerp.com/natives/PHYSICS/ADD_ROPE","markdownUrl":"https://natives.borderlinerp.com/natives/PHYSICS/ADD_ROPE.md","snippets":{"lua":"local retval, unkPtr = AddRope(x, y, z, rotX, rotY, rotZ, length, ropeType, maxLength, minLength, p10, p11, p12, rigid, p14, breakWhenShot, p17)","luaInvoke":"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())","js":"const [retval, unkPtr] = AddRope(x, y, z, rotX, rotY, rotZ, length, ropeType, maxLength, minLength, p10, p11, p12, rigid, p14, breakWhenShot, p17);","jsInvoke":"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());","csharp":"var unkPtr = new OutputArgument();\nint retval = Function.Call<int>((Hash)0xE832D760399EB220, x, y, z, rotX, rotY, rotZ, length, ropeType, maxLength, minLength, p10, p11, p12, rigid, p14, breakWhenShot, unkPtr, p17);\n// unkPtr.GetResult<int>()","notes":["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.","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."]}}