SetDoorOpen

From Onset Developer Wiki
Revision as of 16:57, 13 December 2019 by 28days (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
SetDoorOpen

Type: Function
Context: Server
Introduced: v1.0

Description

Opens or closes a door. This is networked so every player will see the same.

Syntax

SetDoorOpen(door, bOpen)

Parameters

  • door
    The door identifier.
  • bOpen
    true to open the door, false to close it.

Return Value

  • Returns true on success.

Example

AddCommand("open", function(player)
	for k, v in pairs(GetAllDoors()) do
		SetDoorOpen(v, true)
	end
end)

See also