DestroyDoor

From Onset Developer Wiki
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