[Solved] Team Balancer
#1

Hello, I'm searching the hole day for TEAM BALANCERS I found a lot of different balancers but they all don't work. Maybe someone of you guys have one and want to share it.

Thanks in advance.

I have 2 teams, I use gTeam and the teams are TEAM_POLIS and TEAM_TEROR.
Reply
#2

How many teams do you have? I may be able to write something up for you quickly .
Reply
#3

I have something like this, This will work if you have 2 teams, Just change it what you need, If you need to add more it's easy:
pawn Код:
public OnPlayerRequestSpawn(playerid)
{  
    if(Classid[playerid] == 0 || Classid[playerid] == 1 || Classid[playerid] == 2 || Classid[playerid] == 3 || Classid[playerid] == 4)
    {
      if(TeamGrove > TeamLSPD && GroveTeam[playerid] == 0)
      {
            SendClientMessage(playerid,COLOR_RED, "[SYSTEM] In order to balance the teams, You Must Choose The LSPD");
            return 0;
         }
         return 1;
    }
    if(Classid[playerid] == 5 || Classid[playerid] == 6 || Classid[playerid] == 7 || Classid[playerid] == 8 || Classid[playerid] == 9 || Classid[playerid] == 10)
    {
        if(TeamLSPD > TeamGrove && LSPDTeam[playerid] == 0)
        {
            SendClientMessage(playerid,COLOR_RED, "[SYSTEM] In order to balance the teams, You Must Choose The Grove Street");
            return 0;
        }
        return 1;
    }
Reply
#4

Quote:
Originally Posted by [HiC
TheKiller ]
How many teams do you have? I may be able to write something up for you quickly .
Edited: 2 teams.
_________________________________________________

Thanks i'll try it.
Reply
#5

Sory for spam. Don't work.
Reply
#6

How many skins does each team have? and I'll make one
Reply
#7

cant u make a variable? for example:

pawn Код:
new lspdplayers[MAX_PLAYERS];
new groveplayers[MAX_PLAYERS];


public OnPlayerRequestSpawn(playerid)
{
if(lspdplayers[playerid] > groveplayers[playerid])
{
SendClientMessage(playerid,COLOR_BLUE,"Please choose the other team to balance the game");
return 0;
Get the idea?
Reply
#8

Quote:
Originally Posted by Tigerbeast11
cant u make a variable? for example:

pawn Код:
new lspdplayers[MAX_PLAYERS];
new groveplayers[MAX_PLAYERS];


public OnPlayerRequestSpawn(playerid)
{
if(lspdplayers[playerid] > groveplayers[playerid])
{
SendClientMessage(playerid,COLOR_BLUE,"Please choose the other team to balance the game");
return 0;
Get the idea?
then use SetSpawnInfo.
Reply
#9

new lspdplayers[MAX_PLAYERS];
new groveplayers[MAX_PLAYERS];


public OnPlayerSpawn(playerid)
{
if(lspdplayers[playerid] > groveplayers[playerid])
{
SendClientMessage(playerid,COLOR_BLUE,"Please choose the other team to balance the game (Reconnect)");
Kick(playerid);
}
return 1;
}

Reply
#10

Quote:
Originally Posted by Oxside
new lspdplayers[MAX_PLAYERS];
new groveplayers[MAX_PLAYERS];


public OnPlayerSpawn(playerid)
{
if(lspdplayers[playerid] > groveplayers[playerid])
{
SendClientMessage(playerid,COLOR_BLUE,"Please choose the other team to balance the game (Reconnect)");
Kick(playerid);
}
return 1;
}

thats a bad script, because people would get pissed, I would rather disable spawn for the player untill he choose the other team!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)