20.08.2008, 15:24
Quote:
|
Originally Posted by whooper
how would u do it with three teams
|

Код:
new count1, count2, count3;
for(new p = 0; p < GetMaxPlayers(); p++)
{
if (Class[p] == TEAM_COPS)
{
count1++;
}
else if (Class[p] == TEAM_BALLAS)
{
count2++;
}
else if (Class[p] == TEAM_THIRD)
{
count3++;
}
}
if (((count1 > count2) || (count1 > count3)) && Class[playerid] == TEAM_COPS)
return SendClientMessage(playerid, color_here, " This team is full!");
else if (((count2 > count1) || (count2 > count3)) && Class[playerid] == TEAM_BALLAS)
return SendClientMessage(playerid, color_here, " This team is full!");
else if (((count3 > count1) || (count3 > count2)) && Class[playerid] == TEAM_THIRD)
return SendClientMessage(playerid, color_here, " This team is full!");

