05.05.2010, 17:58
Try this
It's untested, but i belive it works
-Naxix
Код:
public OnPlayerRequestSpawn(playerid) { new count1,count2; for(new i = 0; i < GetMaxPlayers(); i++) { if(pi[playerid][army] == 1) count1 ++; // Change "pi[playerid][army] == 1) " to like if(gTeam == TEAM) else if (pi[playerid][Terr] == 1) count2 ++; // Same for here, just the other team } if(count1 > count2) { GameTextForPlayer(playerid,"~r~This team is full! Please select another.",3000,3); ForceClassSelection(playerid); } else if(count2 > count1) { GameTextForPlayer(playerid,"~r~This team is full! Please select another.",3000,3); ForceClassSelection(playerid); } return 1; }
-Naxix