05.05.2010, 18:29
Try this script:
Might be some lose brackets, i made it here.
Код:
public OnPlayerRequestSpawn(playerid) { new count1,count2; for(new i = 0; i < GetMaxPlayers(); i++) { if(PlayerTeam[i] == ZombieTeam) { count1 ++; } else if (PlayerTeam[i] == HumanTeam) { 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; }