23.07.2009, 09:46
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
new tcount[2];
for(new i=0; i<GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i))
{
tcount[gTeam[playerid]] ++;
if(tcount[gTeam[playerid]] > tcount[!gTeam[playerid]])
{
SendClientMessage(playerid, RED, "To balance the teams, please select the other team.");
return 0;
}
}
}
return 1;
}

