18.12.2013, 13:18
Код:
new CountTerrorist, CountArmy; for(new p = 0; p < GetMaxPlayers(); p++) { if (GetPlayerTeam(p) == TEAM_TERRORIST) CountTerrorist++; else if (GetPlayerTeam(p) == TEAM_ARMY) CountArmy++; } if ((CountTerrorist > CountArmy) && GetPlayerTeam(playerid) == TEAM_TERRORIST) { SendClientMessage(playerid,COLOR_RED, "Terrorist is full. please choose Army."); GameTextForPlayer(playerid, "~r~Terrorist is full ~n~ ~b~Please Chooose Army", 3000, 5); return 0; } else if ((CountArmy > CountTerrorist) && GetPlayerTeam(playerid) == TEAM_ARMY) { SendClientMessage(playerid,COLOR_RED, "Army is full. please choose Terrorist."); GameTextForPlayer(playerid, "~b~Army is full ~n~ ~b~Please Chooose Terrorist", 3000, 5); return 0; }