SetDoorOpen

From Onset Developer Wiki
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