- Documentation
- Shared functions
- isElement
Function
isElement
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
destroyElementDestroys an element together with its children. On the client it also destroys GUI elements.createElementCreates an element of your own type, e.g."house"or"zone". It sits under the current resource root and disappears when the resource stops. Useful for grouping elements and storing data.