29.11.2010, 14:19
You need to check if at least 1 player in that team has score bigger than 0. If not, then team loses.
pawn Код:
new armylost=1;
for(new i; i<GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i))
{
if(gTeam[i]==TEAM_ARMY)
{
if(GetPlayerScore(i) > 0)
{
armylost = 0;
break;
}
}
}
}
if(armylost == 1)
{
SendClientMessageToAll(COLOR_BLUE,"Las Venturas Army has lost the battle.");
}