01.08.2011, 14:01
Team Balance?
pawn Code:
#define BALANCER 20 // Amount of players in team
public OnGameModeInit() {
for(new i=0; i<MAX_PLAYERS; i++) {
SetTimerEx("Trololo",AmountOfMinToCheckTeamBalance,true,"d", i);
}
return 1;
}
forward Trololo(playerid);
public Trololo(playerid)
{
if(TeamInfo[playerid] > BALANCER) {
SetPlayerTeam(playerid,MYTEAM);
}
if(TeamInfo[playerid] < BALANCER) {
SetPlayerTeam(playerid,MYTEAM2);
}
return 1;
}