attachRopeToEntity
ATTACH_ROPE_TO_ENTITY0x4B490A6832559A65The GTA V native ATTACH_ROPE_TO_ENTITY of the PHYSICS namespace, as LS:MP client scripts call it: the global function attachRopeToEntity, in JavaScript and in Lua.
attachRopeToEntity(
ropeId: number,
entity: Entity,
x: number,
y: number,
z: number,
p5: boolean
): voidattachRopeToEntity(
ropeId: integer,
entity: Entity,
x: number,
y: number,
z: number,
p5: boolean
)Usage
JavaScript
attachRopeToEntity(ropeId, entity, x, y, z, p5);Lua
attachRopeToEntity(ropeId, entity, x, y, z, p5)Three consecutive numbers can be given as one vector: { x, y, z } (or [x, y, z]) in JavaScript, a Vector3 in Lua.
JavaScript · with vectors
attachRopeToEntity(ropeId, entity, pos, p5);Lua · with vectors
attachRopeToEntity(ropeId, entity, pos, p5)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ropeId | int | number | integer |
entity | Entity | number | integer |
x | float | number | number |
y | float | number | number |
z | float | number | number |
p5 | BOOL | boolean | boolean |
Returns
Nothing. In JavaScript the call evaluates to undefined.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
The position supplied can be anywhere, and the entity should anchor relative to that point from it's origin.
Reference
- Namespace
- Physics PHYSICS
- In the game
void ATTACH_ROPE_TO_ENTITY(int ropeId, Entity entity, float x, float y, float z, BOOL p5)- Hash
0x4B490A6832559A65