10.09.2011, 14:03
I have searched many team balancer scripts and this is what seemed to turn up:
But this wouldn't be accurate right? Everytime a player spawns, it would add one to his team variable. So if players on one team died more than others, they would have more added to their variable?
pawn Code:
new team1;
new team2;
public OnPlayerRequestSpawn(playerid)
{
if(team1 > team2)
{
return 0;
}
else if(team2 > team1)
{
return 0;
}
return 1;
}
public OnPlayerSpawn(playerid)
{
if(Team[playerid] == TEAM_GROVE)
{
team1++;
}
else if(Team[playerid] == TEAM_BALLA)
{
team2++;
}
return 1;
}