RedM Natives

_BREAK_ROPE

ropeTop returns top half of rope, ropeBottom returns bottom half of rope

Hash0x4CFA2B7FAE115ECB
Runtime nameBreakRope
NamespacePHYSICS
SideClient
NameCommunity guess
Docs
Since build1207

Signature

void _BREAK_ROPE(int* ropeId, int* ropeTop, int* ropeBottom, float offsetX, float offsetY, float offsetZ, int p6);

Parameters

NameTypeDescription
ropeIdint*—
ropeTopint*—
ropeBottomint*—
offsetXfloat—
offsetYfloat—
offsetZfloat—
p6int—

Returns void

Description

ropeTop returns top half of rope, ropeBottom returns bottom half of rope

Usage

Lua
local ropeId, ropeTop, ropeBottom = BreakRope(offsetX, offsetY, offsetZ, p6)

-- always works, by hash
local ropeId, ropeTop, ropeBottom = Citizen.InvokeNative(0x4CFA2B7FAE115ECB, Citizen.PointerValueInt(), Citizen.PointerValueInt(), Citizen.PointerValueInt(), offsetX, offsetY, offsetZ, p6)
JavaScript and C#
JavaScript
const [ropeId, ropeTop, ropeBottom] = BreakRope(offsetX, offsetY, offsetZ, p6);

// by hash
const [ropeId, ropeTop, ropeBottom] = Citizen.invokeNative('0x4CFA2B7FAE115ECB', Citizen.pointerValueInt(), Citizen.pointerValueInt(), Citizen.pointerValueInt(), offsetX + 0.0000001, offsetY + 0.0000001, offsetZ + 0.0000001, p6);
C#
var ropeId = new OutputArgument();
var ropeTop = new OutputArgument();
var ropeBottom = new OutputArgument();
Function.Call((Hash)0x4CFA2B7FAE115ECB, ropeId, ropeTop, ropeBottom, offsetX, offsetY, offsetZ, p6);
// ropeId.GetResult<int>()
// ropeTop.GetResult<int>()
// ropeBottom.GetResult<int>()
  • 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.
  • The name is a community guess and may change. If the named call is missing in your client build, use InvokeNative with the hash — it always works.

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.