Skip to content

attachElementToRope

Shared

Attaches an element to a rope so the native solver carries it.

Syntax

bool attachElementToRope(rope theRope, element theElement)

Arguments

theRoperope

Managed rope element.

theElementelement

Object or vehicle to carry.

Returns

true when attached; false for an invalid rope or element.

Ownership and lifecycle

A rope belongs to the resource that created it. GTA has eight native rope slots, so Neon leases them to the logical ropes that need one; a rope without a lease still exists but is not natively simulated at that moment. Every native type except swat requires a valid physical holder.

Important behavior
  • Unfreeze the element first. A frozen element makes the rope solver fight MTA's frozen state.
  • Once attached, raise and lower it with setRopeLength rather than moving it directly.

Where this comes from

RELATED NEON APIS

Continue exploring

Read the system guide →