doorSystemFindExistingDoor
DOOR_SYSTEM_FIND_EXISTING_DOOR0x589F80B325CC82C5The 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.
doorSystemFindExistingDoor(
x: number,
y: number,
z: number,
modelHash: Hash
): [ok: boolean, outDoorHash: Hash]doorSystemFindExistingDoor(
x: number,
y: number,
z: number,
modelHash: Hash
): boolean, HashUsage
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
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
x | float | number | number |
y | float | number | number |
z | float | number | number |
modelHash | Hash | number | integer |
Returns
2 values, in this order: an array in JavaScript, multiple return values in Lua.
| # | Value | Type | JavaScript | Lua | Description |
|---|---|---|---|---|---|
| 1 | ok | BOOL | boolean | boolean | The native’s own return value. |
| 2 | outDoorHash | Hash | number | integer | output |
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