Auto Team Balance
#1

Hello, my problem is that few id's got more choosen then other for example most times id 3 is a zombie, and id 0 never, but why is that so, how can i fix that? Code:

Код:
stock Half()
{
	new Humans;
	foreach(Player, i)
	{
	    if(Humans < 3)
	    {
	        HumanSetup(i);
	        Humans ++;
	    }
	    else
	    {
	        ZombieSetup2(i);
	        Humans = 0;
	    }
	}
	return 1;
}

stock EvenTeams(playerid)
{
    new Humans, Zombies, rand = random(2);
   foreach(Player, i)
    {
    if(rand && Humans == Zombies)
    {
        ZombieSetup2(i);
        Zombies ++;
    }
    else
    {
        HumanSetup2(i);
        Humans ++;
    }
}
	return 1;
}
Reply
#2

anyone?
Reply
#3

if(Humans < 3)
As far as i know, this means Below 3 (notsure2)
Reply
#4

pawn Код:
stock EvenTeams() {
    new
        rand = random(2)
    ;
    foreach(Player, i) {
        if((rand = !rand)) {
            ZombieSetup2(i);
        } else  {
            HumanSetup2(i);
        }
    }
}
Reply
#5

And by stock Half?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)