É mais fácil simplesmente verificar se o player está dentro dos markers ao usar o comando.
addCommandHandler ("pass", function (player, cmd, type)
if (isElementWithinMarker (player, showLegend)) or (isElementWithinMarker (player, showLegend2)) then -- Se o jogador está dentro de um dos markers, então:
if tonumber(type) == 4222 then ------- DENTRO DA BASE
outputChatBox ("ATIVO", player)
setElementPosition (player, modelX, modelY, modelZ)
elseif tonumber(type) == 5222 then --- NO TET
outputChatBox ("ATIVO 2", player)
setElementPosition (player, modelX2, modelY2, modelZ2)
end
end
end)