tim260 Posted September 29, 2011 Share Posted September 29, 2011 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
Phat Looser Posted September 29, 2011 Share Posted September 29, 2011 local playerTeam = getPlayerTeam(thePlayer) Link to comment
tim260 Posted September 29, 2011 Author Share Posted September 29, 2011 if getTeamName ( playerTeam ) == Security then change to ? if local playerTeam = getPlayerTeam(thePlayer) == Security then ?? Link to comment
Aibo Posted September 29, 2011 Share Posted September 29, 2011 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
tim260 Posted September 29, 2011 Author Share Posted September 29, 2011 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 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now