Gibt es eigentlich nen Fix fuer das Nightvision Goggles Problem in SA;MP? Habe viele Freds in Google gefunden die auf das englischen SAMP Forum verweisen, aber beim Aufruf scheinen die Themen zwischenzeitlich geloescht zu sein.
Weiterhin habe ich hier Bedingungen um zu pruefen ob nur noch 1 Team verbleibt auf dem Server, bzw. nur noch 1 Team am leben ist um den Sieger festzustellen.
Kann ich das eventuell anders darstellen? Weil so ist es pott haesslich
#if defined TEAMSIZE
#if TEAMSIZE == 2
if(GetTeamCount(FIRST_TEAM) > 0 && GetTeamCount(SECOND_TEAM) == 0)
{
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");
}
if(GetTeamCount(FIRST_TEAM) == 0 && GetTeamCount(SECOND_TEAM) > 0)
{
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!",SECOND_TEAM_COLOR_TAG);
}
printf("Total game time: %d",totaltime);
SendRconCommand("gmx");
}
#endif
#endif
#if defined TEAMSIZE
#if TEAMSIZE == 3
if(GetTeamCount(FIRST_TEAM) > 0 && GetTeamCount(SECOND_TEAM) == 0 && GetTeamCount(THIRD_TEAM) == 0)
{
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");
}
if(GetTeamCount(FIRST_TEAM) == 0 && GetTeamCount(SECOND_TEAM) > 0 && GetTeamCount(THIRD_TEAM) == 0)
{
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!",SECOND_TEAM_COLOR_TAG);
}
printf("Total game time: %d",totaltime);
SendRconCommand("gmx");
}
if(GetTeamCount(FIRST_TEAM) == 0 && GetTeamCount(SECOND_TEAM) == 0 && GetTeamCount(THIRD_TEAM) > 0)
{
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!",THIRD_TEAM_COLOR_TAG);
}
printf("Total game time: %d",totaltime);
SendRconCommand("gmx");
}
#endif
#endif
#if defined TEAMSIZE
#if TEAMSIZE == 4
if(GetTeamCount(FIRST_TEAM) > 0 && GetTeamCount(SECOND_TEAM) == 0 && GetTeamCount(THIRD_TEAM) == 0 && GetTeamCount(FOURTH_TEAM) == 0)
{
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");
}
if(GetTeamCount(FIRST_TEAM) == 0 && GetTeamCount(SECOND_TEAM) > 0 && GetTeamCount(THIRD_TEAM) == 0 && GetTeamCount(FOURTH_TEAM) == 0)
{
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!",SECOND_TEAM_COLOR_TAG);
}
printf("Total game time: %d",totaltime);
SendRconCommand("gmx");
}
if(GetTeamCount(FIRST_TEAM) == 0 && GetTeamCount(SECOND_TEAM) == 0 && GetTeamCount(THIRD_TEAM) > 0 && GetTeamCount(FOURTH_TEAM) == 0)
{
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!",THIRD_TEAM_COLOR_TAG);
}
printf("Total game time: %d",totaltime);
SendRconCommand("gmx");
}
if(GetTeamCount(FIRST_TEAM) == 0 && GetTeamCount(SECOND_TEAM) == 0 && GetTeamCount(THIRD_TEAM) == 0 && GetTeamCount(FOURTH_TEAM) > 0)
{
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!",FOURTH_TEAM_COLOR_TAG);
}
printf("Total game time: %d",totaltime);
SendRconCommand("gmx");
}
#endif
#endif
#if defined TEAMSIZE
#if TEAMSIZE == 5
if(GetTeamCount(FIRST_TEAM) > 0 && GetTeamCount(SECOND_TEAM) == 0 && GetTeamCount(THIRD_TEAM) == 0 && GetTeamCount(FOURTH_TEAM) == 0 && GetTeamCount(FIFTH_TEAM)== 0)
{
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");
}
if(GetTeamCount(FIRST_TEAM) == 0 && GetTeamCount(SECOND_TEAM) > 0 && GetTeamCount(THIRD_TEAM) == 0 && GetTeamCount(FOURTH_TEAM) == 0 && GetTeamCount(FIFTH_TEAM)== 0)
{
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!",SECOND_TEAM_COLOR_TAG);
}
printf("Total game time: %d",totaltime);
SendRconCommand("gmx");
}
if(GetTeamCount(FIRST_TEAM) == 0 && GetTeamCount(SECOND_TEAM) == 0 && GetTeamCount(THIRD_TEAM) > 0 && GetTeamCount(FOURTH_TEAM) == 0 && GetTeamCount(FIFTH_TEAM)== 0)
{
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!",THIRD_TEAM_COLOR_TAG);
}
printf("Total game time: %d",totaltime);
SendRconCommand("gmx");
}
if(GetTeamCount(FIRST_TEAM) == 0 && GetTeamCount(SECOND_TEAM) == 0 && GetTeamCount(THIRD_TEAM) == 0 && GetTeamCount(FOURTH_TEAM) > 0 && GetTeamCount(FIFTH_TEAM)== 0)
{
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!",FOURTH_TEAM_COLOR_TAG);
}
printf("Total game time: %d",totaltime);
SendRconCommand("gmx");
}
if(GetTeamCount(FIRST_TEAM) == 0 && GetTeamCount(SECOND_TEAM) == 0 && GetTeamCount(THIRD_TEAM) == 0 && GetTeamCount(FOURTH_TEAM) == 0 && GetTeamCount(FIFTH_TEAM) > 0)
{
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!",FIFTH_TEAM_COLOR_TAG);
}
printf("Total game time: %d",totaltime);
SendRconCommand("gmx");
}
#endif
#endif
#if defined TEAMSIZE
#if TEAMSIZE == 6
if(GetTeamCount(FIRST_TEAM) > 0 && GetTeamCount(SECOND_TEAM) == 0 && GetTeamCount(THIRD_TEAM) == 0 && GetTeamCount(FOURTH_TEAM) == 0 && GetTeamCount(FIFTH_TEAM) == 0 && GetTeamCount(SIXTH_TEAM) == 0)
{
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");
}
if(GetTeamCount(FIRST_TEAM) == 0 && GetTeamCount(SECOND_TEAM) > 0 && GetTeamCount(THIRD_TEAM) == 0 && GetTeamCount(FOURTH_TEAM) == 0 && GetTeamCount(FIFTH_TEAM)== 0 && GetTeamCount(SIXTH_TEAM) == 0)
{
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!",SECOND_TEAM_COLOR_TAG);
}
printf("Total game time: %d",totaltime);
SendRconCommand("gmx");
}
if(GetTeamCount(FIRST_TEAM) == 0 && GetTeamCount(SECOND_TEAM) == 0 && GetTeamCount(THIRD_TEAM) > 0 && GetTeamCount(FOURTH_TEAM) == 0 && GetTeamCount(FIFTH_TEAM)== 0 && GetTeamCount(SIXTH_TEAM) == 0)
{
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!",THIRD_TEAM_COLOR_TAG);
}
printf("Total game time: %d",totaltime);
SendRconCommand("gmx");
}
if(GetTeamCount(FIRST_TEAM) == 0 && GetTeamCount(SECOND_TEAM) == 0 && GetTeamCount(THIRD_TEAM) == 0 && GetTeamCount(FOURTH_TEAM) > 0 && GetTeamCount(FIFTH_TEAM)== 0 && GetTeamCount(SIXTH_TEAM) == 0)
{
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!",FOURTH_TEAM_COLOR_TAG);
}
printf("Total game time: %d",totaltime);
SendRconCommand("gmx");
}
if(GetTeamCount(FIRST_TEAM) == 0 && GetTeamCount(SECOND_TEAM) == 0 && GetTeamCount(THIRD_TEAM) == 0 && GetTeamCount(FOURTH_TEAM) == 0 && GetTeamCount(FIFTH_TEAM) > 0 && GetTeamCount(SIXTH_TEAM) == 0)
{
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!",FIFTH_TEAM_COLOR_TAG);
}
printf("Total game time: %d",totaltime);
SendRconCommand("gmx");
}
if(GetTeamCount(FIRST_TEAM) == 0 && GetTeamCount(SECOND_TEAM) == 0 && GetTeamCount(THIRD_TEAM) == 0 && GetTeamCount(FOURTH_TEAM) == 0 && GetTeamCount(FIFTH_TEAM) == 0 && GetTeamCount(SIXTH_TEAM) > 0)
{
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!",SIXTH_TEAM_COLOR_TAG);
}
printf("Total game time: %d",totaltime);
SendRconCommand("gmx");
}
#endif
#endif
Alles anzeigen
Kann man dafuer eventuell ne Funktion schreiben? Leider habe ich keinen Ansatz dafuer