Team balancing?
#1

Hey, I have 2 minigames on my server, Counter Strike and Protect The President. (I made both myself from scratch)
I'm using gTeam on both of them.
Uh i need team balancing for both...
I really need it because one time when i tryed them both, on CS it was 6 Counter Terrorists vs 2 Terrorists and on PTP it was 1 protector and 1 president vs 5 Terrorists...
Please i really need a team balancing system, that works.

Thanks

EDIT: Omg why the fuck its an advert here O_O, i didnt put it there so, who did it? I kill you (*Achmed voice)
|
|
\/
Reply
#2

It's default...

And you can just use a for / foreach loop, really not that hard if you can create a GM.
Reply
#3

Please help me with this
I don't know exactly what you mean
I know the for loop but not how to use it for team balancing
Reply
#4

Team Count variable.
pawn Код:
new TeamCount[ 10 ]; // Change the number, to the amount of teams you have.
pawn Код:
public OnPlayerSpawn(playerid)
{
TeamCount[ GetPlayerTeam( playerid ) ] ++;
}
Something like that, then you can use SetPlayerTeam().
Reply
#5

Quote:
Originally Posted by CalgonX
Team Count variable.
pawn Код:
new TeamCount[ 10 ]; // Change the number, to the amount of teams you have.
pawn Код:
public OnPlayerSpawn(playerid)
{
TeamCount[ GetPlayerTeam( playerid ) ] ++;
}
Something like that, then you can use SetPlayerTeam().
I've added evrything, exept SetPlayerTeam(), how to use it for team balancing?
Im new with the Team functions I've only used gTeam...
Reply
#6

Bump...
Reply
#7

Check if the amount of players in team 1 is bigger than in team 2, if so, put him in team 2, otherwise, if team 2 is bigger than team 1, put him in team 2. If both statements are false, let them choose theirselves or get a random team.
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)