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

Function

isElement

Server and clientElementsIdentical to MTA:SA

Checks whether a value is an existing element. Use it before acting on an element that may have been destroyed.

Syntax

bool isElement(mixed theValue)

Arguments

theValuemixed
Any value.

Returns

true for an existing element.

Example

setTimer(function()
    if isElement(car) then
        destroyElement(car)
    end
end, 30000, 1)

See also