-- لم يتم التجربة
gate = createObject(980, 2127.099609375, 2848.599609375, 12.60000038147, 0, 0, 0 ) --Object ID (Airport Gate=978) & Co-Ordinates of your gates start of position.
gatecol = createColCircle (2127.099609375,2848.599609375, 15 ) --Co-Ordinates "X" and "Y" and the radius, I use 15 as default.
function openagates ( player )
if getElementType(player) == "player" then
local theTeam = getPlayerTeam(player)
if ( theTeam ) and ( theTeam == getTeamFromName("TeamName") ) then
moveObject ( gate, 2000, 2127.1000976563, 2848.6000976563, 16.89999961853 ) --The speed in which 7000 is slow and 2000 is fast to open, Co-Ordinates for the gate to move to.
else
outputChatBox ( "Sorry You Must Be In Group [F.S] Leader Hobe", thePlayer )
end
end
end
addEventHandler ( "onColShapeHit", gatecol, openagates ) --Event Handler to trigger the function
function closeagates(player)
if getElementType(player) == "player" then
local theTeam = getPlayerTeam(player)
if ( theTeam ) and ( theTeam == getTeamFromName("TeamName") ) then
moveObject ( gate, 2000, 2127.099609375, 2848.599609375, 12.60000038147 ) --The speed in which 7000 is slow and 1000 is fast to open, Co-Ordinates for the gate to close.
end
end
end
addEventHandler ( "onColShapeLeave", gatecol, closeagates ) --Event Handler to trigger the function