Hallo,
ich habe folgendes Problem..
Mein Befehl /members sendet 1mio mal (Ganzen Chat voll) Blood (Rank 0) obwohl ich Rank 3 bin und es eigentlich nur 1x gesendet werden sollte....
Hier mein ocmd:members Befehl..
ocmd:members(playerid)
{
new str[128],membername[MAX_PLAYER_NAME];
if(Spieler[playerid][Mafia] > 0)
{
switch(Spieler[playerid][Mafia])
{
case 1:
{
SendClientMessage(playerid,GELB,"***Mitglieder Online***");
for(new i; i<MAX_PLAYERS; i++)
{
GetPlayerName(i,membername,sizeof(membername));
if(Spieler[i][Mafia] == Spieler[i][Mafia])
{
switch(Spieler[i][Rank])
{
case 0:{format(str,sizeof(str),"%s (Rank 0)",membername); SendClientMessage(playerid,Weiss,str);}
case 1:{format(str,sizeof(str),"%s (Rank 1)",membername); SendClientMessage(playerid,Weiss,str);}
case 2:{format(str,sizeof(str),"%s (Rank 2)",membername); SendClientMessage(playerid,Weiss,str);}
case 3:{format(str,sizeof(str),"%s (Rank 3)",membername); SendClientMessage(playerid,Weiss,str);}
}
}
}
}
case 2:
{
SendClientMessage(playerid,GELB,"***Mitglieder Online***");
for(new i; i<MAX_PLAYERS; i++)
{
GetPlayerName(i,membername,sizeof(membername));
if(Spieler[i][Mafia] == 2)
{
switch(Spieler[i][Rank])
{
case 0:{format(str,sizeof(str),"%s (Rank 0)",membername); SendClientMessage(playerid,Weiss,str);}
case 1:{format(str,sizeof(str),"%s (Rank 1)",membername); SendClientMessage(playerid,Weiss,str);}
case 2:{format(str,sizeof(str),"%s (Rank 2)",membername); SendClientMessage(playerid,Weiss,str);}
case 3:{format(str,sizeof(str),"%s (Rank 3)",membername); SendClientMessage(playerid,Weiss,str);}
}
}
}
}
case 3:
{
SendClientMessage(playerid,GELB,"***Mitglieder Online***");
for(new i; i<MAX_PLAYERS; i++)
{
GetPlayerName(i,membername,sizeof(membername));
if(Spieler[i][Mafia] == 3)
{
switch(Spieler[i][Rank])
{
case 0:{format(str,sizeof(str),"%s (Rank 0)",membername); SendClientMessage(playerid,Weiss,str);}
case 1:{format(str,sizeof(str),"%s (Rank 1)",membername); SendClientMessage(playerid,Weiss,str);}
case 2:{format(str,sizeof(str),"%s (Rank 2)",membername); SendClientMessage(playerid,Weiss,str);}
case 3:{format(str,sizeof(str),"%s (Rank 3)",membername); SendClientMessage(playerid,Weiss,str);}
}
}
}
}
}
}
else
{
SendClientMessage(playerid,ROT,"Du bist in keiner Fraktion/Mafia");
}
return 1;
}
Mit freundlichen Grüßen,
Blood
edit.code