gate1= createObject ( 969, -488.75805664063, -562.94116210938, 24.461265563965, 0, 0, 180 ) 
        gate2 = createObject ( 969, -488.5793762207, -562.96948242188, 24.451913833618, 0, 0, 0 ) 
        gatecol = createColCircle ( -488.6, -562.94116210938, 24.461265563965, 7 ) 
         
  
       skins = 
        { 
            [ 46 ] = true, 
            [ 47 ] = true, 
            [ 48 ] = true, 
            [ 59 ] = true, 
            [ 66 ] = true, 
            [ 71 ] = true, 
            [ 113 ] = true, 
            [ 120 ] = true, 
            [ 124 ] = true, 
            [ 147 ] = true, 
            [ 163 ] = true, 
            [ 164 ] = true, 
            [ 171 ] = true, 
            [ 172 ] = true, 
            [ 211 ] = true, 
            [ 217 ] = true, 
            [ 240 ] = true, 
            [ 249 ] = true, 
        } 
  
  
  
    function opengates(thePlayer) 
    local skin = getElementModel(thePlayer) 
    if ( skins[skin] ) then 
           moveObject (gate1, 5000, -495, -562.94116210938, 24.461265563965 ) 
           moveObject (gate2, 5000, -481, -562.96948242188, 24.451913833618 ) 
    end 
    end 
     
      
    addEventHandler( "onColShapeHit", gatecol, opengates ) 
      
    function closegates(thePlayer) 
    local skin = getElementModel(thePlayer) 
    if ( skins[skin] ) then 
           moveObject (gate1, 5000, -488.75805664063, -562.94116210938, 24.461265563965 ) 
           moveObject (gate2, 5000, -488.5793762207, -562.96948242188, 24.451913833618 ) 
    end 
    end 
    addEventHandler( "onColShapeLeave", gatecol, closegates )