M MY Multiplayer: Wiki
Lado
Tipo

getElementAttachedTo

Compartilhado

Diz em qual elemento um elemento está anexado.

element|false getElementAttachedTo(element element)

Parâmetros

NomeTipoDescrição
elementelementO elemento a consultar.

Retorno

O elemento alvo, ou false se o elemento não está anexado.

Exemplo

addCommandHandler("onde", function(player)
    local target = getElementAttachedTo(player)
    if target then
        outputDebugString(getPlayerName(player) .. " está preso a: " .. getElementType(target))
    end
end)

Veja também