08.03.2010, 12:56
can some one help me to how i can create team balance i have this one:
for OnPlayerDisconnect
can some one help me or give me other team balance, i got problem when someone loginto my server he can choose the team with 5players and the other one have 0.
Код:
public OnPlayerRequestSpawn(playerid) { if(gTeam[playerid] == TEAM_CT && CTcount > TTcount) { SendClientMessage(playerid,COLOR_RED,"[SERVER] Please choose another team so match will be balanced."); return 0; } else if(gTeam[playerid] == TEAM_TT && TTcount > CTcount) { SendClientMessage(playerid,COLOR_RED,"[SERVER] Please choose another team so match will be balanced."); return 0; } return 1; }
Код:
if(gTeam[playerid] == TEAM_CT) CTcount --; else if(gTeam[playerid] == TEAM_TT) TTcount --;