/blacklist funktioniert nicht

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Hallo liebe Brotfische ich habe einen Problem mit Dem Befehl /Blacklist und zwar wenn man jemanden auf die Blacklist setzen will kommt da unknown Command.
    Hier der Befehl:
    if(strcmp(cmd, "/blacklist", true) == 0)
    {
    if(PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pLeader] == 6 ||PlayerInfo[playerid][pLeader] == 12|| PlayerInfo[playerid][pLeader] == 13 ||PlayerInfo[playerid][pLeader] == 14|| PlayerInfo[playerid][pLeader] == 15 ||PlayerInfo[playerid][pLeader] == 16|| PlayerInfo[playerid][pLeader] == 17 ||PlayerInfo[playerid][pLeader] == 18||PlayerInfo[playerid][pLeader] == 19||PlayerInfo[playerid][pLeader] == 23)
    {
    new mafid = GetPlayerMafia(playerid);
    if(mafid==1||mafid==2||mafid==3||mafid==4||mafid==5||mafid==6||mafid==7||mafid==8||mafid==9||mafid==10||mafid==11)
    {
    new blstr[256];
    SendClientMessage(playerid,COLOR_GREEN,"-----Blacklist-----");
    format(blstr,sizeof(blstr),"1. %s",Blacklist[mafid][user1]);
    SendClientMessage(playerid,COLOR_GREEN,blstr);
    format(blstr,sizeof(blstr),"2. %s",Blacklist[mafid][user2]);
    SendClientMessage(playerid,COLOR_GREEN,blstr);
    format(blstr,sizeof(blstr),"3. %s",Blacklist[mafid][user3]);
    SendClientMessage(playerid,COLOR_GREEN,blstr);
    format(blstr,sizeof(blstr),"4. %s",Blacklist[mafid][user4]);
    SendClientMessage(playerid,COLOR_GREEN,blstr);
    format(blstr,sizeof(blstr),"5. %s",Blacklist[mafid][user5]);
    SendClientMessage(playerid,COLOR_GREEN,blstr);
    format(blstr,sizeof(blstr),"6. %s",Blacklist[mafid][user6]);
    SendClientMessage(playerid,COLOR_GREEN,blstr);
    format(blstr,sizeof(blstr),"7. %s",Blacklist[mafid][user7]);
    SendClientMessage(playerid,COLOR_GREEN,blstr);
    format(blstr,sizeof(blstr),"8. %s",Blacklist[mafid][user8]);
    SendClientMessage(playerid,COLOR_GREEN,blstr);
    format(blstr,sizeof(blstr),"9. %s",Blacklist[mafid][user9]);
    SendClientMessage(playerid,COLOR_GREEN,blstr);
    format(blstr,sizeof(blstr),"10. %s",Blacklist[mafid][user10]);
    SendClientMessage(playerid,COLOR_GREEN,blstr);
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_RED, "Du bist in keiner Mafia/Ganga!");
    }
    }

  • nep kommt immer noch unknown command und wenn ich nur setblacklist eingebe kommt das gebe /setblacklist [id] ein! und wenn ich das dann machen will kommt unknown coomand.
    Ich füge mal alle befehle ein.
    /setblacklist
    if(strcmp(cmd, "/setblacklist", true) == 0)
    {
    if(PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pLeader] == 6 ||PlayerInfo[playerid][pLeader] == 12|| PlayerInfo[playerid][pLeader] == 13 ||PlayerInfo[playerid][pLeader] == 14|| PlayerInfo[playerid][pLeader] == 15 ||PlayerInfo[playerid][pLeader] == 16|| PlayerInfo[playerid][pLeader] == 17 ||PlayerInfo[playerid][pLeader] == 18||PlayerInfo[playerid][pLeader] == 19||PlayerInfo[playerid][pLeader] == 23)
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD1, "FEHLER: /setblacklist [id]");
    return 1;
    }
    new blid = strval(tmp);
    if(IsPlayerConnected(blid))
    {
    if(IsPlayerNPC(blid))
    {
    SendClientMessage(playerid, COLOR_GREY, " Du kannst kein Auftrag auf ein Bot geben");
    return 1;
    }
    new mafid = GetPlayerMafia(playerid);
    new plName[MAX_PLAYER_NAME];
    new sendName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,sendName,sizeof(sendName));
    GetPlayerName(blid,plName,sizeof(plName));
    strmid(Blacklist[mafid][user10],Blacklist[mafid][user9],0,strlen(Blacklist[mafid][user9]),255);
    strmid(Blacklist[mafid][user9],Blacklist[mafid][user8],0,strlen(Blacklist[mafid][user8]),255);
    strmid(Blacklist[mafid][user8],Blacklist[mafid][user7],0,strlen(Blacklist[mafid][user7]),255);
    strmid(Blacklist[mafid][user7],Blacklist[mafid][user6],0,strlen(Blacklist[mafid][user6]),255);
    strmid(Blacklist[mafid][user6],Blacklist[mafid][user5],0,strlen(Blacklist[mafid][user5]),255);
    strmid(Blacklist[mafid][user5],Blacklist[mafid][user4],0,strlen(Blacklist[mafid][user4]),255);
    strmid(Blacklist[mafid][user4],Blacklist[mafid][user3],0,strlen(Blacklist[mafid][user3]),255);
    strmid(Blacklist[mafid][user3],Blacklist[mafid][user2],0,strlen(Blacklist[mafid][user2]),255);
    strmid(Blacklist[mafid][user2],Blacklist[mafid][user1],0,strlen(Blacklist[mafid][user1]),255);
    strmid(Blacklist[mafid][user1],plName,0,strlen(plName),255);
    IsBlacklist[blid] = 1;
    if(mafid==1)
    {
    new famstr[256];
    format(famstr,sizeof(famstr),"%s hat %s auf die Blacklist gesetzt!",sendName,plName);
    SendFamilyMessage(5,COLOR_RED,famstr);
    }
    else if(mafid==2)
    {
    new famstr[256];
    format(famstr,sizeof(famstr),"%s hat %s auf die Blacklist gesetzt!",sendName,plName);
    SendFamilyMessage(6,COLOR_RED,famstr);
    }
    else if(mafid==3)
    {
    new famstr[256];
    format(famstr,sizeof(famstr),"%s hat %s auf die Blacklist gesetzt!",sendName,plName);
    SendFamilyMessage(16,COLOR_RED,famstr);
    }
    else if(mafid==4)
    {
    new famstr[256];
    format(famstr,sizeof(famstr),"%s hat %s auf die Blacklist gesetzt!",sendName,plName);
    SendFamilyMessage(17,COLOR_RED,famstr);
    }
    else if(mafid==5)
    {
    new famstr[256];
    format(famstr,sizeof(famstr),"%s hat %s auf die Blacklist gesetzt!",sendName,plName);
    SendFamilyMessage(17,COLOR_RED,famstr);
    }
    else if(mafid==6)
    {
    new famstr[256];
    format(famstr,sizeof(famstr),"%s hat %s auf die Blacklist gesetzt!",sendName,plName);
    SendFamilyMessage(17,COLOR_RED,famstr);
    }
    else if(mafid==7)
    {
    new famstr[256];
    format(famstr,sizeof(famstr),"%s hat %s auf die Blacklist gesetzt!",sendName,plName);
    SendFamilyMessage(17,COLOR_RED,famstr);
    }
    else if(mafid==8)
    {
    new famstr[256];
    format(famstr,sizeof(famstr),"%s hat %s auf die Blacklist gesetzt!",sendName,plName);
    SendFamilyMessage(17,COLOR_RED,famstr);
    }
    else if(mafid==9)
    {
    new famstr[256];
    format(famstr,sizeof(famstr),"%s hat %s auf die Blacklist gesetzt!",sendName,plName);
    SendFamilyMessage(17,COLOR_RED,famstr);
    }
    else if(mafid==10)
    {
    new famstr[256];
    format(famstr,sizeof(famstr),"%s hat %s auf die Blacklist gesetzt!",sendName,plName);
    SendFamilyMessage(17,COLOR_RED,famstr);
    }
    else if(mafid==11)
    {
    new famstr[256];
    format(famstr,sizeof(famstr),"%s hat %s auf die Blacklist gesetzt!",sendName,plName);
    SendFamilyMessage(17,COLOR_RED,famstr);
    }
    return 1;
    }
    else return SendClientMessage(playerid, COLOR_GRAD1, "Der Spieler ist nicht Online!");
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Du bist kein Leader einer Gang/Mafia!");
    }
    return 1;
    }


    /Blacklist
    if(strcmp(cmd, "/blacklist", true) == 0)
    {
    if(PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pLeader] == 6 ||PlayerInfo[playerid][pLeader] == 12|| PlayerInfo[playerid][pLeader] == 13 ||PlayerInfo[playerid][pLeader] == 14|| PlayerInfo[playerid][pLeader] == 15 ||PlayerInfo[playerid][pLeader] == 16|| PlayerInfo[playerid][pLeader] == 17 ||PlayerInfo[playerid][pLeader] == 18||PlayerInfo[playerid][pLeader] == 19||PlayerInfo[playerid][pLeader] == 23)
    {
    new mafid = GetPlayerMafia(playerid);
    if(mafid==1||mafid==2||mafid==3||mafid==4||mafid==5||mafid==6||mafid==7||mafid==8||mafid==9||mafid==10||mafid==11)
    {
    new blstr[256];
    SendClientMessage(playerid,COLOR_GREEN,"-----Blacklist-----");
    format(blstr,sizeof(blstr),"1. %s",Blacklist[mafid][user1]);
    SendClientMessage(playerid,COLOR_GREEN,blstr);
    format(blstr,sizeof(blstr),"2. %s",Blacklist[mafid][user2]);
    SendClientMessage(playerid,COLOR_GREEN,blstr);
    format(blstr,sizeof(blstr),"3. %s",Blacklist[mafid][user3]);
    SendClientMessage(playerid,COLOR_GREEN,blstr);
    format(blstr,sizeof(blstr),"4. %s",Blacklist[mafid][user4]);
    SendClientMessage(playerid,COLOR_GREEN,blstr);
    format(blstr,sizeof(blstr),"5. %s",Blacklist[mafid][user5]);
    SendClientMessage(playerid,COLOR_GREEN,blstr);
    format(blstr,sizeof(blstr),"6. %s",Blacklist[mafid][user6]);
    SendClientMessage(playerid,COLOR_GREEN,blstr);
    format(blstr,sizeof(blstr),"7. %s",Blacklist[mafid][user7]);
    SendClientMessage(playerid,COLOR_GREEN,blstr);
    format(blstr,sizeof(blstr),"8. %s",Blacklist[mafid][user8]);
    SendClientMessage(playerid,COLOR_GREEN,blstr);
    format(blstr,sizeof(blstr),"9. %s",Blacklist[mafid][user9]);
    SendClientMessage(playerid,COLOR_GREEN,blstr);
    format(blstr,sizeof(blstr),"10. %s",Blacklist[mafid][user10]);
    SendClientMessage(playerid,COLOR_GREEN,blstr);
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_RED, "Du bist in keiner Mafia/Ganga!");
    }
    return 1;
    }


    /clearblacklist
    if(strcmp(cmd, "/clearblacklist", true) == 0 || strcmp(cmd, "/clearbl", true) == 0)
    {
    new mafid = GetPlayerMafia(playerid);
    if(PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pLeader] == 6 ||PlayerInfo[playerid][pLeader] == 12|| PlayerInfo[playerid][pLeader] == 13 ||PlayerInfo[playerid][pLeader] == 14|| PlayerInfo[playerid][pLeader] == 15 ||PlayerInfo[playerid][pLeader] == 16|| PlayerInfo[playerid][pLeader] == 17 ||PlayerInfo[playerid][pLeader] == 18||PlayerInfo[playerid][pLeader] == 19||PlayerInfo[playerid][pLeader] == 23)
    {
    strmid(Blacklist[mafid][user10],"Niemand",0,strlen("Niemand"),255);
    strmid(Blacklist[mafid][user9],"Niemand",0,strlen("Niemand"),255);
    strmid(Blacklist[mafid][user8],"Niemand",0,strlen("Niemand"),255);
    strmid(Blacklist[mafid][user7],"Niemand",0,strlen("Niemand"),255);
    strmid(Blacklist[mafid][user6],"Niemand",0,strlen("Niemand"),255);
    strmid(Blacklist[mafid][user5],"Niemand",0,strlen("Niemand"),255);
    strmid(Blacklist[mafid][user4],"Niemand",0,strlen("Niemand"),255);
    strmid(Blacklist[mafid][user3],"Niemand",0,strlen("Niemand"),255);
    strmid(Blacklist[mafid][user2],"Niemand",0,strlen("Niemand"),255);
    strmid(Blacklist[mafid][user1],"Niemand",0,strlen("Niemand"),255);
    SendClientMessage(playerid,COLOR_YELLOW,"Blacklist gecleart");
    }
    return 1;
    }