Auto Team Balance - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Auto Team Balance (
/showthread.php?tid=429654)
Auto Team Balance -
Blackazur - 10.04.2013
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;
}
AW: Auto Team Balance -
Blackazur - 10.04.2013
anyone?
Re: Auto Team Balance -
ThaCrypte - 10.04.2013
if(Humans < 3)
As far as i know, this means Below 3 (notsure2)
AW: Auto Team Balance -
Nero_3D - 10.04.2013
pawn Код:
stock EvenTeams() {
new
rand = random(2)
;
foreach(Player, i) {
if((rand = !rand)) {
ZombieSetup2(i);
} else {
HumanSetup2(i);
}
}
}
AW: Auto Team Balance -
Blackazur - 15.04.2013
And by stock Half?