getElementAttachedTo
Compartilhado
Diz em qual elemento um elemento está anexado.
element|false getElementAttachedTo(element element)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
| element | element | O 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)