Difference between revisions of "SetDoorOpen"

From Onset Developer Wiki
(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...")
 
(No difference)

Latest revision as of 11:57, 8 October 2019

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__