30 Percent
#1

Solved
Reply
#2

Post the function you made
Reply
#3

Solved
Reply
#4

"i've tried to loop players or make a custom function name GetTeamPlayersAlive, did not work either"....


Anyways, how to you define players type?
And what is the percentage of players you want to become zombies on a new round's start?
Reply
#5

Solved
Reply
#6

I suppose the team for zombies is TEAM_ZOMBIE?
Reply
#7

Quote:
Originally Posted by iRage
Посмотреть сообщение
I suppose the team for zombies is TEAM_ZOMBIE?
Yes, correct.
Reply
#8

Alright, the following will make a ratio of 1:1

pawn Код:
new Humans, Zombies, rand = random(2);
if(rand == 0) // Setting ID 0 to Human and continuing with the cycle
{
    foreach(Player, i)
    {
        if(Humans == Zombies)
        {
            gTeam[i] = TEAM_HUMAN;
            Humans ++;
        }
        else
        {
            gTeam[i] = TEAM_ZOMBIE;
            Zombies ++;
        }
    }
}
else // Setting ID 0 to Zombie and continuing with the cycle
{
    foreach(Player, i)
    {
        if(Humans == Zombies)
        {
            gTeam[i] = TEAM_ZOMBIE;
            Zombies ++;
        }
        else
        {
            gTeam[i] = TEAM_HUMAN;
            Humans ++;
        }
    }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)