SetDoorOpen

From Onset Developer Wiki
Revision as of 09:57, 8 October 2019 by BlueMountains (talk | contribs) (Created page with "{{Info|Function|Server|1.0}} {{FuncDescription|Opens or closes a door. This is networked so every player will see the same.}} {{FuncSyntax|SetDoorOpen(door, bOpen)}} {{Func...")
(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

__EDIT_ME__