Jump to content

Help! Script Now Working


Recommended Posts

Well I tried adding the skins part it didn't work, Everything else works, the gate works everything, but just not the skins, so can someone help me. Just don't mess with the gates and stuff just the skins part is the thing that doesn't work, I want those skins to be aloud to open the gate, ty

    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 ) 
  
function opengates(thePlayer) 
if ( getTeamName(getPlayerTeam(thePlayer)) == "FabulousBloodzGang" ) then 
       moveObject (gate1, 5000, -495, -562.94116210938, 24.461265563965 ) 
       moveObject (gate2, 5000, -481, -562.96948242188, 24.451913833618 ) 
end 
end 
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, 
    } 
  
addEventHandler( "onColShapeHit", gatecol, opengates ) 
  
function closegates(thePlayer) 
if ( getTeamName(getPlayerTeam(thePlayer)) == "FabulousBloodzGang" ) 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 ) 

Link to comment
  
        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 ) 
  

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...