InteriorClient

getInteriorAtCoordsWithType

GET_INTERIOR_AT_COORDS_WITH_TYPE0x05B7A89BD78797FC

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

SignatureJavaScript
getInteriorAtCoordsWithType(
  x: number,
  y: number,
  z: number,
  interiorType: string
): Interior
SignatureLua
getInteriorAtCoordsWithType(
  x: number,
  y: number,
  z: number,
  interiorType: string
): Interior

Usage

JavaScript
const interior = getInteriorAtCoordsWithType(x, y, z, interiorType);
Lua
local interior = getInteriorAtCoordsWithType(x, y, z, interiorType)

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 = getInteriorAtCoordsWithType(pos, interiorType);
Lua · with vectors
local interior = getInteriorAtCoordsWithType(pos, interiorType)

Parameters

ParameterTypeJavaScriptLua
xfloatnumbernumber
yfloatnumbernumber
zfloatnumbernumber
interiorTypestringstringstring

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 the interior ID representing the requested interior at that location (if found?). The supplied interior string is not the same as the one used to load the interior.

Use: unpinInterior(getInteriorAtCoordsWithType(x, y, z, interior))

Interior types include: "V_Michael", "V_Franklins", "V_Franklinshouse", etc.. you can find them in the scripts.

Not a very useful native as you could just use getInteriorAtCoords instead and get the same result, without even having to specify the interior type.

Reference

Namespace
Interior INTERIOR
In the game
Interior GET_INTERIOR_AT_COORDS_WITH_TYPE(float x, float y, float z, const char* interiorType)
Hash
0x05B7A89BD78797FC

Open in the interactive natives reference