DestroyDoor: Difference between revisions

From Onset Developer Wiki
Created page with "{{Info|Function|Server|1.0}} {{FuncDescription|Destroys a door that was earlier created by CreateDoor.}} {{FuncSyntax|DestroyDoor(door)}} {{FuncParameters}} {{FuncParam..."
 
Justus (talk | contribs)
m Simple destroydoor example
 
Line 11: Line 11:


== Example ==
== Example ==
__EDIT_ME__
<syntaxhighlight lang="Lua">
function cmd_destroydoor(player, door)
if (IsValidDoor(door)) then
return DestroyDoor(door)
end
AddPlayerChat(player, "Invalid door")
end
AddCommand("destroydoor", cmd_destroydoor)
</syntaxhighlight>


{{RelatedFunctions}}
{{RelatedFunctions}}
__EDIT_ME__
* [[IsValidDoor]]
* [[GetDoorCount]]
* [[GetDoorLocation]]
* [[GetStreamedDoors]]
* [[GetSoundCount]]

Latest revision as of 23:38, 19 December 2019

DestroyDoor

Type: Function
Context: Server
Introduced: v1.0

Description

Destroys a door that was earlier created by CreateDoor.

Syntax

DestroyDoor(door)

Parameters

  • door
    The door to destroy.

Return Value

  • Returns true on success.

Example

function cmd_destroydoor(player, door)
	if (IsValidDoor(door)) then
		return DestroyDoor(door)
	end
	AddPlayerChat(player, "Invalid door")
end
AddCommand("destroydoor", cmd_destroydoor)

See also