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

Function

getAttachedElements

Server and clientElementsIdentical to MTA:SA

Returns the elements attached to an element.

Syntax

table getAttachedElements(element theElement)

Arguments

theElementelement
The element.

Returns

A table of elements.

Example

addEventHandler("onVehicleExplode", root, function()
    for _, el in ipairs(getAttachedElements(source)) do
        destroyElement(el)
    end
end)