PhysicsClient

getRopeVertexCoord

GET_ROPE_VERTEX_COORD0xEA61CA8E80F09E4D

The GTA V native GET_ROPE_VERTEX_COORD of the PHYSICS namespace, as LS:MP client scripts call it: the global function getRopeVertexCoord, in JavaScript and in Lua.

SignatureJavaScript
getRopeVertexCoord(
  ropeId: number,
  vertex: number
): { x: number, y: number, z: number }
SignatureLua
getRopeVertexCoord(ropeId: integer, vertex: integer): Vector3

Usage

JavaScript
const { x, y, z } = getRopeVertexCoord(ropeId, vertex);
Lua
local coords = getRopeVertexCoord(ropeId, vertex)
-- coords.x, coords.y, coords.z

Parameters

ParameterTypeJavaScriptLua
ropeIdintnumberinteger
vertexintnumberinteger

Returns

Vector3 JavaScript { x: number, y: number, z: number }, Lua Vector3

A 3D vector. JavaScript gets a plain { x, y, z } object; Lua gets a real Vector3, with .x .y .z and arithmetic. As an argument, one vector fills three consecutive coordinates.

Reference

Namespace
Physics PHYSICS
In the game
Vector3 GET_ROPE_VERTEX_COORD(int ropeId, int vertex)
Hash
0xEA61CA8E80F09E4D

Open in the interactive natives reference