gghvcffcv Posted March 25, 2014 Share Posted March 25, 2014 The problem is When a player is in SWAT Team and other player want to Join in SWAT Team the other Player cannot join Server: function aceptarr (hitElement) local theTeam = createTeam ( "SWAT" ) setTeamColor ( theTeam, 0, 0, 255 ) if theTeam then setPlayerTeam ( source, theTeam ) setPlayerNametagColor ( source, 0, 0, 255 ) setElementModel ( source, 285 ) giveWeapon ( source, 31, 550 ) giveWeapon ( source, 23, 550 ) giveWeapon ( source, 3, 550 ) giveWeapon ( source, 29, 550 ) giveWeapon ( source, 46, 550 ) giveWeapon ( source, 41, 5000 ) end end addEvent( "onGreeting", true ) addEventHandler( "onGreeting", root, aceptarr ) Link to comment
Castillo Posted March 25, 2014 Share Posted March 25, 2014 You must create the team once, then get it from it's name. createTeam ( "SWAT", 0, 0, 255 ) function aceptarr ( ) local theTeam = getTeamFromName ( "SWAT" ) if ( theTeam ) then setPlayerTeam ( source, theTeam ) setPlayerNametagColor ( source, 0, 0, 255 ) setElementModel ( source, 285 ) giveWeapon ( source, 31, 550 ) giveWeapon ( source, 23, 550 ) giveWeapon ( source, 3, 550 ) giveWeapon ( source, 29, 550 ) giveWeapon ( source, 46, 550 ) giveWeapon ( source, 41, 5000 ) end end addEvent( "onGreeting", true ) addEventHandler( "onGreeting", root, aceptarr ) Link to comment
gghvcffcv Posted March 25, 2014 Author Share Posted March 25, 2014 You must create the team once, then get it from it's name. createTeam ( "SWAT", 0, 0, 255 ) function aceptarr ( ) local theTeam = getTeamFromName ( "SWAT" ) if ( theTeam ) then setPlayerTeam ( source, theTeam ) setPlayerNametagColor ( source, 0, 0, 255 ) setElementModel ( source, 285 ) giveWeapon ( source, 31, 550 ) giveWeapon ( source, 23, 550 ) giveWeapon ( source, 3, 550 ) giveWeapon ( source, 29, 550 ) giveWeapon ( source, 46, 550 ) giveWeapon ( source, 41, 5000 ) end end addEvent( "onGreeting", true ) addEventHandler( "onGreeting", root, aceptarr ) Thanks you ! 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