ZonesClient

getZoneAtCoords

GET_ZONE_AT_COORDS0x27040C25DE6CB2F4

The GTA V native GET_ZONE_AT_COORDS of the ZONE namespace, as LS:MP client scripts call it: the global function getZoneAtCoords, in JavaScript and in Lua.

SignatureJavaScript
getZoneAtCoords(x: number, y: number, z: number): number
SignatureLua
getZoneAtCoords(x: number, y: number, z: number): integer

Usage

JavaScript
const result = getZoneAtCoords(x, y, z);
Lua
local result = getZoneAtCoords(x, y, z)

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
const result = getZoneAtCoords(pos);
Lua · with vectors
local result = getZoneAtCoords(pos)

Parameters

ParameterTypeJavaScriptLua
xfloatnumbernumber
yfloatnumbernumber
zfloatnumbernumber

Returns

int JavaScript number, Lua integer

Reference

Namespace
Zones ZONE
In the game
int GET_ZONE_AT_COORDS(float x, float y, float z)
Hash
0x27040C25DE6CB2F4

Open in the interactive natives reference