M MY Multiplayer: Wiki
Side
Kind

getElementAttachedTo

Shared

Tells which element an element is attached to.

element|false getElementAttachedTo(element element)

Parameters

NameTypeDescription
elementelementThe 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)

See also