eBarrier = createObject ( 968, 1544.6999511719, -1630.5999755859, 13.10000038147, 0, 90, 90 )
gatecol = createColCircle ( 1544.5999755859, -1627.1999511719, 12.39999961853, 1 )
bar1 = createObject ( 994, 1544.6999511719, -1623.9000244141, 12.39999961853, 0, 0, 90 )
bar2 = createObject ( 994, 1544.6999511719, -1623.9000244141, 13.39999961853, 0, 0, 90 )
bar3 = createObject ( 994, 1544.9000244141, -1639.0000000000, 12.39999961853, 0, 0, 90 )
bar4 = createObject ( 994, 1544.9000244141, -1639.0000000000, 13.39999961853, 0, 0, 90 )
moving = false
function move ( thePlayer )
if ( getTeamName ( getPlayerTeam ( thePlayer ) ) == "Police" ) then
if ( moving ) then
return
end
if ( eventName == "onColShapeHit" ) then
moveObject ( eBarrier, 1500, 1544.6999511719, -1630.5999755859, 13.10000038147, 0, -90, 0 )
moving = true
else
moveObject ( eBarrier, 1500, 1544.6999511719, -1630.5999755859, 13.10000038147, 0, 90, 0 )
moving = true
end
end
end
addEventHandler ( "onColShapeHit", gatecol, move )
addEventHandler ( "onColShapeLeave", gatecol, move )