IsDoorOpen
From Onset Developer Wiki
Description
Checks the door state.
Syntax
IsDoorOpen(door)
Parameters
- door
The door identifier.
Return Value
- Returns true if the door is open, false if closed.
Example
AddEvent("OnPlayerInteractDoor", function(player, door, bWantsOpen)
--AddPlayerChat(player, "Door: "..door..", "..tostring(bWantsOpen))
-- Let the players open/close the door by default.
if IsDoorOpen(door) then
SetDoorOpen(door, false)
else
SetDoorOpen(door, true)
end
end)
See also
__EDIT_ME__