DestroyDoor

From Onset Developer Wiki
Revision as of 23:38, 19 December 2019 by Justus (talk | contribs) (Simple destroydoor example)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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