VehicleClient

findSpawnCoordinatesForHeli

FIND_SPAWN_COORDINATES_FOR_HELI0x8DC9675797123522

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

SignatureJavaScript
findSpawnCoordinatesForHeli(ped: Ped): { x: number, y: number, z: number }
SignatureLua
findSpawnCoordinatesForHeli(ped: Ped): Vector3

Usage

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

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger

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.

Native is significantly more complicated than simply generating a random vector & length.

Reference

Namespace
Vehicle VEHICLE
In the game
Vector3 FIND_SPAWN_COORDINATES_FOR_HELI(Ped ped)
Hash
0x8DC9675797123522
Introduced
Game build 1290 legacy numbering
Formerly
_FIND_RANDOM_POINT_IN_SPACE

Open in the interactive natives reference