Also, wenn du TEAM_FIRST als 0 deklariert hast, kannst du es folgendermaßen verkürzen:
C
stock isEnd()
{
new bool:end;
for(new i=0; i<TEAMSIZE; i++)
{
if(GetTeamCount(i) > 0)
{
if(end) return 0;
end = true;
}
}
return end;
}
if(isEnd())
{
for(new i;i<MAX_PLAYERS;i++)
{
SendClientMessageEx(i,COLOR_WHITE,"SERVER: All remaining teams have been wiped. Team %s {FFFFFF}has won the game!",FIRST_TEAM_COLOR_TAG);
}
printf("Total game time: %d",totaltime);
SendRconCommand("gmx");
}
Alles anzeigen