Auto Team Balance
#1

How do I make an auto team balance so like if there

1 zombie but 5+ humans one person will become a zombie with the other person?

And if 0 humans, 2+ zombies one person will become a human?
Reply
#2

It's only an exemple...

pawn Код:
// make a settimer.
if(humans >= 5 || zombies <=2))
{
  for(new i = 0; i < MAX_PLAYERS; i++)
  {
       i = zombies;
       random(100) + SetPlayerTeam(playerid,zombie);
       SpawnPlayer(playerid);
       if(i >= 3) break;
  }
 
}
Reply
#3

How do I make it for

TEAM_ZOMBIE
and
TEAM_HUMAN?
Reply
#4

(100 Viewing) viewing this section

None helps me!
Reply
#5

pawn Код:
new TeamPlayers[ <Amount of teams here> ];

public OnPlayerRequestSpawn( playerid )
{
    for( new teams; teams < 23; teams++ )
    {
        if( teams == gTeam[ playerid ] ) continue;
        if( TeamPlayers[ gTeam[ playerid ] ] > TeamPlayers[ teams ] + 3)
        {
            SendClientMessage( playerid, COLOR_RED, "You can't join this team as it would unbalance the game!" );
            return 0;
        }
    }
    return 1;
}
Reply
#6

No I want like a team switcher so if like

1 zombie but 5+ humans one person will become a zombie with the other person?

And if 0 humans, 2+ zombies one person will become a human?
Reply
#7

Quote:
Originally Posted by sanrock
Посмотреть сообщение
No I want like a team switcher so if like

1 zombie but 5+ humans one person will become a zombie with the other person?

And if 0 humans, 2+ zombies one person will become a human?
What I posted will get you there. Try learning it. Besides there are plenty of threads like this use the search function and type Team Balancer or something similar.
Reply
#8

You posted a fulll team script not an switch team script!
Reply
#9

Why don't you try to script it yourself? And then if it's bugged post here for help. You are requesting a script and that doesn't belong here.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)