The Lab
ZONE native

_GET_MAP_ZONE_AT_COORDS

returns Hash4 paramsbuild 1207

Returns the hash of the map zone of the given zone type (for example state, district or town) that contains the coordinates.

Useful for location-based logic such as naming the town a player is in.

Signature

C
Hash _GET_MAP_ZONE_AT_COORDS(float x, float y, float z, int type); // 0x43AD8FC02B429D33 b1207

Parameters

#NameType
1xfloat
2yfloat
3zfloat
4typeint

Facts

Facts about _GET_MAP_ZONE_AT_COORDS
Name
_GET_MAP_ZONE_AT_COORDS
Hash
0x43AD8FC02B429D33
Namespace
Returns
Hash
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local hash = Citizen.InvokeNative(0x43AD8FC02B429D33, -- _GET_MAP_ZONE_AT_COORDS
  0.0, -- float x
  0.0, -- float y
  0.0, -- float z
  0, -- int type
  Citizen.ResultAsInteger()
)
print(hash)
JavaScript
// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const hash = Citizen.invokeNative("0x43AD8FC02B429D33", // _GET_MAP_ZONE_AT_COORDS
  0.0, // float x
  0.0, // float y
  0.0, // float z
  0, // int type
  Citizen.resultAsInteger()
);
console.log(hash)
C#
int hash = Function.Call<int>((Hash)0x43AD8FC02B429D33, // _GET_MAP_ZONE_AT_COORDS
  0.0f, // float x
  0.0f, // float y
  0.0f, // float z
  0 // int type
);
All ZONE natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.