Team Balance
#2

foreach or y_iterrate have a random feature, use it.

pawn Код:
Iter_Random(Player); //for players but if you have your own iter., than you can specify that instead of Player
And i completely recommend you to create your own iterrate for team humans!

pawn Код:
stock TeamBalance()
{
    new Humans;
    foreach(Player, i)
    {
        if(Humans < 3)
        {
            HumanSetup(i);
            printf("Selected humans");
            Humans ++;
        }
        else
        {
            new randomzombie = Iter_Random(Player);
            if(GetPlayerTeam(i) == TEAM_HUMANS)
            {
                ZombieSetup2(randomzombie);
                printf("Selected zombies");
                Humans = 0;
            }
            else //make this timer run again or if its already dependent on "Humans=0", than ignore.
        }
    }
    printf("Finished Selecting teams");
    return 1;
}
Reply


Messages In This Thread
Team Balance - by Blackazur - 14.05.2015, 17:36
Re: Team Balance - by Gammix - 15.05.2015, 01:56

Forum Jump:


Users browsing this thread: 1 Guest(s)