GetStateOfClosestDoorOfType
Docslocal locked, heading = GetStateOfClosestDoorOfType(type, x, y, z)Description
locked is 0 if no door is found
locked is 0 if door is unlocked
locked is 1 if door is found and unlocked.
-------------
the locked bool is either 0(unlocked)(false) or 1(locked)(true)
Parameters
| Name | Type | Description |
|---|---|---|
type | Hash | — |
x | float | — |
y | float | — |
z | float | — |
locked | BOOL* | — |
heading | float* | — |
Quick Snippet: Get Coordinatesxyzheading
xyzheadingAdd this command to your client script to retrieve precise locations in-game.
-- Add this to your client.lua. Type /pos in-game to copy coords.
RegisterCommand('pos', function()
local ped = PlayerPedId()
local coords = GetEntityCoords(ped)
local heading = GetEntityHeading(ped)
local output = string.format("vector4(%.2f, %.2f, %.2f, %.2f)", coords.x, coords.y, coords.z, heading)
print(output)
TriggerEvent('chat:addMessage', { args = { '^4[COORD]^0', output } })
end)Returns
voidThis native does not return a value.