VehicleClient

getAttachedPickUpHookPosition

GET_ATTACHED_PICK_UP_HOOK_POSITION0xCBDB9B923CACC92D

The GTA V native GET_ATTACHED_PICK_UP_HOOK_POSITION of the VEHICLE namespace, as LS:MP client scripts call it: the global function getAttachedPickUpHookPosition, in JavaScript and in Lua.

SignatureJavaScript
getAttachedPickUpHookPosition(
  cargobob: Vehicle
): { x: number, y: number, z: number }
SignatureLua
getAttachedPickUpHookPosition(cargobob: Vehicle): Vector3

Usage

JavaScript
const { x, y, z } = getAttachedPickUpHookPosition(cargobob);
Lua
local coords = getAttachedPickUpHookPosition(cargobob)
-- coords.x, coords.y, coords.z

Parameters

ParameterTypeJavaScriptLua
cargobobVehiclenumberinteger

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.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Gets the position of the cargobob hook, in world coords.

Reference

Namespace
Vehicle VEHICLE
In the game
Vector3 GET_ATTACHED_PICK_UP_HOOK_POSITION(Vehicle cargobob)
Hash
0xCBDB9B923CACC92D
Formerly
_GET_CARGOBOB_HOOK_POSITION

Open in the interactive natives reference