HELP WITH BALANCE
#9

pawn Code:
new Players;
pawn Code:
//OnPlayerConnect
Players++;
pawn Code:
//OnPlayerDisconnect
Players--;
pawn Code:
//OnPlayerRequestSpawn
new tmembers = -1;
#define NUM_TEAMS (11)
for(new i; i != MAX_PLAYERS; i++) if(gTeam[playerid] == gTeam[i]) tmembers++;
if(tmembers >= floatround((Players / NUM_TEAMS), floatround_ceil))
    return !SendClientMessage(playerid 0xFFFFFFAA, "Please choose another team!");
That would be an easy example of a team balancer, it stops the player from spawning if the team is at his maximum size
The maximum size is Players divided through team count
Reply


Messages In This Thread
HELP WITH BALANCE - by MEXICAN_NORTE - 24.05.2010, 15:12
Re: HELP WITH BALANCE - by Hiddos - 24.05.2010, 15:47
Re: HELP WITH BALANCE - by DJDhan - 24.05.2010, 17:35
Re: HELP WITH BALANCE - by MEXICAN_NORTE - 26.05.2010, 14:44
Re: HELP WITH BALANCE - by MEXICAN_NORTE - 29.05.2010, 13:26
Re: HELP WITH BALANCE - by MEXICAN_NORTE - 30.05.2010, 17:44
Re: HELP WITH BALANCE - by azzerking - 30.05.2010, 17:58
Re: HELP WITH BALANCE - by ViruZZzZ_ChiLLL - 30.05.2010, 17:58
Re: HELP WITH BALANCE - by Nero_3D - 30.05.2010, 18:02

Forum Jump:


Users browsing this thread: 2 Guest(s)