InteriorClient

getInteriorAtCoords

GET_INTERIOR_AT_COORDS0xB0F7F8663821D9C3

The GTA V native GET_INTERIOR_AT_COORDS of the INTERIOR namespace, as LS:MP client scripts call it: the global function getInteriorAtCoords, in JavaScript and in Lua.

SignatureJavaScript
getInteriorAtCoords(x: number, y: number, z: number): Interior
SignatureLua
getInteriorAtCoords(x: number, y: number, z: number): Interior

Usage

JavaScript
const interior = getInteriorAtCoords(x, y, z);
Lua
local interior = getInteriorAtCoords(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 interior = getInteriorAtCoords(pos);
Lua · with vectors
local interior = getInteriorAtCoords(pos)

Parameters

ParameterTypeJavaScriptLua
xfloatnumbernumber
yfloatnumbernumber
zfloatnumbernumber

Returns

Interior JavaScript number, Lua integer

Identifier of an interior.

Notes

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

Returns interior ID from specified coordinates. If coordinates are outside, then it returns 0.

Example for VB.NET
Dim interiorID As Integer = Native.Function.Call(Of Integer)(Hash.GET_INTERIOR_AT_COORDS, X, Y, Z)

Reference

Namespace
Interior INTERIOR
In the game
Interior GET_INTERIOR_AT_COORDS(float x, float y, float z)
Hash
0xB0F7F8663821D9C3

Open in the interactive natives reference