Hallo, ich hab hier meinen /suspect befehl aber die Leute kriegen trotz 6 Wanteds noch mehr wenn der Befehl benutzt wird, obwohl ich das versucht hab mit ner If abfrage zu ändern..
if(strcmp(cmd, "/suspect", true) == 0 || strcmp(cmd, "/su", true) == 0)
{
if(Gduty[playerid] != 1)
{
SendClientMessage(playerid, COLOR_INDIGO, "Du bist nicht im Dienst!");
return 1;
}
tmp = strtok(cmdtext,idx);
if(!strlen(tmp))
{
SendClientMessage(playerid,COLOR_SYSTEM,"[CMDINFO]: /suspect [Player ID] [Grund]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(PlayerInfo[playerid][pFaction] == 1 || PlayerInfo[playerid][pFaction] == 2)
{
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[128];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid,COLOR_SYSTEM,"[CMDINFO]: /suspect [Players ID] [Grund]");
return 1;
}
new wantedlevel;
wantedlevel = GetPlayerWantedLevel(giveplayerid);
if(wantedlevel == 6)
{
SendClientMessage(playerid,COLOR_SYSTEM,"Der Spieler wird schon gesucht!");
return 1;
}else{
SetPlayerWantedLevel(giveplayerid, wantedlevel+1);
WantedLevel[giveplayerid] = wantedlevel;
format(string, sizeof(string), "DEPARTMENT - %s wird jetzt wegen %s gesucht.", GetPlayerNameEx(giveplayerid), result);
SendfbiMessage(COLOR_LIGHTBLUE, string);
SendPoliceMessage(COLOR_LIGHTBLUE, string);
return 1;
}
}
}
}
}
gruß,
exotic