Jump to content

Please find whats wrong


tim260

Recommended Posts

   gate1 = createObject ( 980, -1753.9000244141, -115.90000152588, 5.3000001907349, 0, 0, 270.5 ) 
   col = createColCircle ( -1753.9000244141, -115.90000152588, 5.3000001907349, 7 ) 
  
function opena51gates(thePlayer) 
if getTeamName ( playerTeam ) == Security then 
       moveObject (gate1, 3000, -1754, -126, 5.3000001907349 ) 
end 
end 
addEventHandler( "onColShapeHit", col, opena51gates ) 
  
function closea51gates(thePlayer) 
if getTeamName ( playerTeam ) == Security then 
       moveObject (gate1, 4000, -1753.9000244141, -115.90000152588, 5.3000001907349 ) 
end 
end 
addEventHandler( "onColShapeLeave", col, closea51gates ) 

its gives me a bad argument @ getteamname thats stuff whats wrong ??

Link to comment

no

gate1 = createObject ( 980, -1753.9000244141, -115.90000152588, 5.3000001907349, 0, 0, 270.5 ) 
col = createColCircle ( -1753.9000244141, -115.90000152588, 5.3000001907349, 7 ) 
  
function opena51gates(thePlayer) 
  local playerTeam = getPlayerTeam(thePlayer) 
  if playerTeam and getTeamName(playerTeam) == "Security" then 
    moveObject (gate1, 3000, -1754, -126, 5.3000001907349 ) 
  end 
end 
addEventHandler( "onColShapeHit", col, opena51gates ) 
  
function closea51gates(thePlayer) 
  local playerTeam = getPlayerTeam(thePlayer) 
  if playerTeam and getTeamName(playerTeam) == "Security" then 
    moveObject (gate1, 4000, -1753.9000244141, -115.90000152588, 5.3000001907349 ) 
  end 
end 
addEventHandler( "onColShapeLeave", col, closea51gates ) 

Link to comment
no
gate1 = createObject ( 980, -1753.9000244141, -115.90000152588, 5.3000001907349, 0, 0, 270.5 ) 
col = createColCircle ( -1753.9000244141, -115.90000152588, 5.3000001907349, 7 ) 
  
function opena51gates(thePlayer) 
  local playerTeam = getPlayerTeam(thePlayer) 
  if playerTeam and getTeamName(playerTeam) == "Security" then 
    moveObject (gate1, 3000, -1754, -126, 5.3000001907349 ) 
  end 
end 
addEventHandler( "onColShapeHit", col, opena51gates ) 
  
function closea51gates(thePlayer) 
  local playerTeam = getPlayerTeam(thePlayer) 
  if playerTeam and getTeamName(playerTeam) == "Security" then 
    moveObject (gate1, 4000, -1753.9000244141, -115.90000152588, 5.3000001907349 ) 
  end 
end 
addEventHandler( "onColShapeLeave", col, closea51gates ) 

Thanks mate it worked :), are you working for a server or something cuz i could use a team :D

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...