Hey.. wenn ich als Cop /wanted eingebe dann werden nur manchmal leute angezeigt.. hier der befehl
if(strcmp(cmd, "/wanted", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gTeam[playerid] == 2 || IsACop(playerid) || PlayerInfo[playerid][pArbeiter] == 21 || PlayerInfo[playerid][pChef] == 21 || PlayerInfo[playerid][pArbeiter] == 2 || PlayerInfo[playerid][pChef] == 2 || PlayerInfo[playerid][pArbeiter] == 3 || PlayerInfo[playerid][pChef] == 3)
{
new x;
SendClientMessage(playerid, COLOR_TUTBLAU, "|~~~~~~~~| Fahndungsmeldungen |~~~~~~~~|");
for(new i=0; i < MAX_PLAYERS; i++) {
if(IsPlayerConnected(i))
{
if(WantedLevel[i] > 1)
{
GetPlayerName(i, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "%s%s: %d", string,giveplayer,WantedLevel[i]);
x++;
if(x > 3) {
SendClientMessage(playerid, YELLOW, string);
x = 0;
format(string, sizeof(string), "");
} else {
format(string, sizeof(string), "%s, ", string);
}
}
}
}
if(x <= 3 && x > 0) {
string[strlen(string)-2] = '.';
SendClientMessage(playerid, YELLOW, string);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Du bist kein Beamter!");
}
}
return 1;
}