ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. destroyElement

Function

destroyElement

Server and clientElementsIdentical to MTA:SA

Destroys an element together with its children. On the client it also destroys GUI elements.

Syntax

bool destroyElement(element elementToDestroy)

Arguments

elementToDestroyelement
The element.

Returns

true on success.

Example

local car = createVehicle(411, 0, 0, 3)
setTimer(function()
    if isElement(car) then destroyElement(car) end
end, 60000, 1)

See also