08.12.2009, 13:48
https://sampwiki.blast.hk/wiki/SetTimer
pawn Код:
new
Team1 = 0,
Team2 = 0;
for(new id = 0; id < MAX_PLAYERS; id++)
{
if(!IsPlayerConnected(id)) continue;
if(gTeam[id] == TEAM_ALPHA) //or whatever you use
{
Team1 = Team1 + GetPlayerScore(id);
}
else
{
Team2 = Team2 + GetPlayerScore(id);
}
}
if(Team1 > Team2)
{
GameTextForPlayer(playerid, "Team1 won", 3000, 4);
}
else if(Team 1 < Team2)
{
GameTextForPlayer(playerid, "Team2 won", 3000, 4);
}
else
{
GameTextForPlayer(playerid, "Tie", 3000, 4);
}