manve1 Posted October 29, 2012 Posted October 29, 2012 How could i set maximum player amount in a team? Like for example, i created a team, and i only want that 3people would be allowed in that team, no more? thank you for the help. Looking for tutorials or information? check out: www.simpleask.co.uk
Castillo Posted October 29, 2012 Posted October 29, 2012 When you set them to the team, you can check the amount of players with this function: countPlayersInTeam San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
manve1 Posted October 29, 2012 Author Posted October 29, 2012 i tried using that, but i didn't get how to set maximum amount allowed in a team Looking for tutorials or information? check out: www.simpleask.co.uk
Castillo Posted October 29, 2012 Posted October 29, 2012 Post your script. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
manve1 Posted October 29, 2012 Author Posted October 29, 2012 addEventHandler( 'onClientGUIClick', buttonJuggernaut, function() triggerServerEvent('giveJuggernautTeam', localPlayer) local theTeamJuggernaut = getTeamFromName( 'Juggernaut' ) if ( countPlayersInTeam( theTeamJuggernaut ) ) then guiSetVisible( windowTeams, false ) else tooMuchJuggernauts = guiCreateLabel( 0.2, 0.3, 0.4, 0.1, "There are to many Juggernauts already", true ) guiSetFont( tooMuchJuggernauts, "sa-header" ) end end, false ) addEvent('giveJuggernautTeam', true) addEventHandler('giveJuggernautTeam', getRootElement(), function() setPlayerTeam(source, getTeamFromName('Juggernaut')) end ) something i tried to do, but didn't work out, top is client, bottom is server sided scripts, i know they are not one of the working ones, but everything there like gui, buttons exist Looking for tutorials or information? check out: www.simpleask.co.uk
Castillo Posted October 29, 2012 Posted October 29, 2012 if ( countPlayersInTeam( theTeamJuggernaut ) ) then You are not comparing it with anything. if ( countPlayersInTeam( theTeamJuggernaut ) < 3 ) then San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Smart. Posted October 29, 2012 Posted October 29, 2012 if (countPlayersInTeam( theTeamJuggernaut ) > 3 ) then return end lol
manve1 Posted October 29, 2012 Author Posted October 29, 2012 thank you Solidsnake14, seb:> sorry, i don't have enough time to test yours too Looking for tutorials or information? check out: www.simpleask.co.uk
Castillo Posted October 29, 2012 Posted October 29, 2012 You're welcome. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Smart. Posted October 29, 2012 Posted October 29, 2012 It's basically the same, I just didn't see solidsnakes reply. lol
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