Olá, boa tarde tudo bem?
Você pode resolver verificando se o elemento que hitou o marker é um player, e se for se ele está logado.
Teste desta maneira:
------------------------------------------------------------------------------
-------------------------------[PORTÃO PRENDER]-------------------------------
------------------------------------------------------------------------------
--- MARKERS ---
local gate3 = createObject(986, 1588.599609375, -1638.2998046875, 13.199999809265, 0, 0, 0)
local marker3 = createMarker(1588.599609375, -1638.2998046875, 13.199999809265, "cylinder", 5, 0, 0, 0, 0)
--- FUNÇÃO ABRIR ---
function moveGate3(thePlayer)
if thePlayer and isElement(thePlayer) and getElementType(thePlayer) == "player" then
if not isGuestAccount(getPlayerAccount(thePlayer)) then
if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)) , aclGetGroup("Policial")) then
moveObject(gate3, 1000, 1588.599609375, -1638.2998046875, 4.5)
end
end
end
end
addEventHandler("onMarkerHit", marker3, moveGate3)
--- FUNÇÃO FECHAR ---
function move_back_gate3()
moveObject(gate3, 1000, 1588.599609375, -1638.2998046875, 13.199999809265)
end
addEventHandler("onMarkerLeave", marker3, move_back_gate3)