ObjectClient1 output

doorSystemFindExistingDoor

DOOR_SYSTEM_FIND_EXISTING_DOOR0x589F80B325CC82C5

The GTA V native DOOR_SYSTEM_FIND_EXISTING_DOOR of the OBJECT namespace, as LS:MP client scripts call it: the global function doorSystemFindExistingDoor, in JavaScript and in Lua.

SignatureJavaScript
doorSystemFindExistingDoor(
  x: number,
  y: number,
  z: number,
  modelHash: Hash
): [ok: boolean, outDoorHash: Hash]
SignatureLua
doorSystemFindExistingDoor(
  x: number,
  y: number,
  z: number,
  modelHash: Hash
): boolean, Hash

Usage

JavaScript
const [ok, outDoorHash] = doorSystemFindExistingDoor(x, y, z, modelHash);
Lua
local ok, outDoorHash = doorSystemFindExistingDoor(x, y, z, modelHash)

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 [ok, outDoorHash] = doorSystemFindExistingDoor(pos, modelHash);
Lua · with vectors
local ok, outDoorHash = doorSystemFindExistingDoor(pos, modelHash)

Parameters

ParameterTypeJavaScriptLua
xfloatnumbernumber
yfloatnumbernumber
zfloatnumbernumber
modelHashHashnumberinteger

Returns

2 values, in this order: an array in JavaScript, multiple return values in Lua.

#ValueTypeJavaScriptLuaDescription
1okBOOLbooleanbooleanThe native’s own return value.
2outDoorHashHashnumberintegeroutput

Notes

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

Search radius: 0.5

Reference

Namespace
Object OBJECT
In the game
BOOL DOOR_SYSTEM_FIND_EXISTING_DOOR(float x, float y, float z, Hash modelHash, Hash* outDoorHash)
Hash
0x589F80B325CC82C5

Open in the interactive natives reference