SetDoorOpen: Difference between revisions

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..."
 
28days (talk | contribs)
No edit summary
 
Line 21: Line 21:


{{RelatedFunctions}}
{{RelatedFunctions}}
__EDIT_ME__
{{Template:DoorFunctions}}

Latest revision as of 16:57, 13 December 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