SA-MP Forums Archive
making a team balance how? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: making a team balance how? (/showthread.php?tid=375390)



making a team balance how? - niels44 - 06.09.2012

hey guys,

as first, YES i tried search button and ******, and i found some same questions, but none of them are same as me im afraid... so here is my question:

how to make a team balance? so when like the army has like 15 players in their team and terrorists have 10 players in their team, and a new player joins, then how to make it that when the player chooses the army team and hits spawn, it will say "BALANCE: team army is full, try team terrorists."??

here are some of my variables and defines of my teams:
pawn Код:
#define TERRORISTS 1
#define ARMY 2
#define TERRORISTS_COLOR 0xFF0000FF
#define ARMY_COLOR 0x0000FFFF
new AllTeams[MAX_PLAYERS];
ok well i think those are them, how to make the balance?

greets niels


Re: making a team balance how? - leonardo1434 - 06.09.2012

pawn Код:
new teamA,teamB;

onplayerrequestclass
//players select a teams
++teamA
or
++teamB
onplayerdisconnect
--teamA
or
--teamB