getElementAttachedTo
Shared
Tells which element an element is attached to.
element|false getElementAttachedTo(element element)
Parameters
| Name | Type | Description |
|---|---|---|
| element | element | The element to check. |
Returns
The target element, or false if the element is not attached.
Example
addCommandHandler("onde", function(player)
local target = getElementAttachedTo(player)
if target then
outputDebugString(getPlayerName(player) .. " is attached to a " .. getElementType(target))
end
end)