local objeto = createObject (980, 1497.400, -698.5, 96.5, 0, 0, 0)
local x, y, z = getElementPosition (objeto)
local Zona = createColCircle (x, y, 6, 6)
function Function (thePlayer, matchingDimension)
if getElementType (thePlayer) == "player" then -- Se o elemento que colidiu no col for um player, então:
if (isObjectInACLGroup ("user."..getAccountName (getPlayerAccount (thePlayer)), aclGetGroup("Admin"))) then -- Se o jogador estiver na acl "Admin" por exemplo, então:
moveObject (objeto, 500, 1497.400, -698.5, 20.300)
outputChatBox ("@Portão aberto!", thePlayer)
end
end
end
addEventHandler ("onColShapeHit", Zona, Function)
function Function2 (thePlayer, matchingDimension)
if getElementType (thePlayer) == "player" then -- Se o elemento que saiu do col for um player, então:
if (isObjectInACLGroup ("user."..getAccountName (getPlayerAccount (thePlayer)), aclGetGroup("Admin"))) then -- Se o jogador estiver na acl "Admin" por exemplo, então:
moveObject (objeto, 500, 1497.400, -698.5, 96)
outputChatBox ("@Portão fechado!", thePlayer)
end
end
end
addEventHandler ("onColShapeLeave", Zona, Function2)
@Niick