Hilft mir bitte Wantedproblem -> Profis

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


    Ich habe ein Wantedproblem .. also es ist so eingestellt im Script nicht mit /su (playerid) (Anzahl) (Grund) sondern /su (Playerid) (Kürzel) also kürzel dort kommt zb
    irgendwas rein wie zb -> Flucht oderso.. dann wird automatisch wanteds vergeben.. das ist aber irgendwie buggy?


    Bei den cops wenn die /wanted machen steht dann 6 (wenn die 6 vergeben haben) und bei den spielern die die wanteds bekommen meistens 1-2 ... da mir keiner helfen konnte bin ich auf die Idee gekommen das komplett zu ändern (das wantedsystem) also wie beim standart gf mit /su (playerid) (Anzahl) (Grund) .. sollte es jemanden geben der mir dabei helfen könnte am besten per TV .. der würde von mir 10€ Paysafecard bekommen und etwas sehr seltenes ^^ was ich hier nicht sagen will (Aus Sicherheitsgründen)


    Also hier trotzdem ein paar Zeilen


    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;
    }



    if(strcmp(cmd, "/suspect", true) == 0 || strcmp(cmd, "/su", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    new x_job[128];
    if(OnDuty[playerid]==1||Undercover[playerid]==1)
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, GRAU, "Verwendung: (/su)spect [Playerid] [kürzel]");
    return 1;
    }
    x_job = strtok(cmdtext, idx);
    if(!strlen(x_job ))
    {
    SendClientMessage(playerid, GRAU, " /suspect [Playerid/Name] [kürzel]");
    return 1;
    }
    new turnmes[128];
    new turned[MAX_PLAYER_NAME];
    GetPlayerName(playerid, turned, sizeof(turned));
    new points = WantedPoints[playerid];
    giveplayerid = ReturnUser(tmp);
    tmp = strtok(cmdtext, idx);


    if(IsPlayerConnected(giveplayerid))
    {
    if(giveplayerid != INVALID_PLAYER_ID)
    {
    for(new i = 0; i <MAX_PLAYERS; i++)
    {
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    if(WantedLevel[giveplayerid] >= 6)
    {
    SendClientMessage(playerid,GRAU,"Der Spieler hat schon 6 Wanteds");
    return 1;
    }
    else if(strcmp(x_job,"wrongdrive",true) == 0)
    {
    format(turnmes,sizeof(turnmes), "Officer %s hat dich des Falschfahrens überführt!", sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, turnmes);
    SetPlayerWantedLevel(giveplayerid,points+1);
    WantedPoints[giveplayerid] += 1;
    WantedLevel[giveplayerid]+=1;
    format(turnmes, sizeof(turnmes), "%s hat %s des Falschfahrens überführt!",sendername,giveplayer);
    SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
    }
    else if(strcmp(x_job,"flucht",true) == 0)
    {
    format(string,sizeof(string), "Officer %s hat dich der Flucht überführt!", sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    SetPlayerWantedLevel(giveplayerid,points+2);
    WantedPoints[giveplayerid] += 2;
    WantedLevel[giveplayerid]+=2;
    format(turnmes, sizeof(turnmes), "%s hat %s der Flucht überführt!",sendername,giveplayer);
    SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
    }
    else if(strcmp(x_job,"angriff",true) == 0)
    {
    format(string,sizeof(string), "Officer %s hat dich des Angriffes überführt!", sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    SetPlayerWantedLevel(giveplayerid,points+1);
    WantedPoints[giveplayerid] += 3;
    WantedLevel[giveplayerid]+=3;
    format(turnmes, sizeof(turnmes), "%s hat %s des Angriffes überführt!",sendername,giveplayer);
    SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
    }
    else if(strcmp(x_job,"mord",true) == 0)
    {
    format(string,sizeof(string), "Officer %s hat dich des Mordes überführt!", sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    SetPlayerWantedLevel(giveplayerid,points+2);
    WantedPoints[giveplayerid] += 3;
    WantedLevel[giveplayerid]+=3;
    format(turnmes, sizeof(turnmes), "%s hat %s des Mordes überführt!",sendername,giveplayer);
    SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
    }
    else if(strcmp(x_job,"beleidigung",true) == 0)
    {
    format(string,sizeof(string), "Officer %s hat dich der Beleidigung überführt!", sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    SetPlayerWantedLevel(giveplayerid,points+1);
    WantedPoints[giveplayerid] += 1;
    WantedLevel[giveplayerid]+=1;
    format(turnmes, sizeof(turnmes), "%s hat %s der Beleidigung überführt!",sendername,giveplayer);
    SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
    }
    else if(strcmp(x_job,"lichter",true) == 0)
    {
    format(string,sizeof(string), "Officer %s hat dich beim Autofahren in der Dunkelheit ohne Licht erwischt!", sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    SetPlayerWantedLevel(giveplayerid,points+1);
    WantedPoints[giveplayerid] += 1;
    WantedLevel[giveplayerid]+=1;
    format(turnmes, sizeof(turnmes), "%s hat %s beim Autofahren in der Dunkelheit ohne Licht erwischt!",sendername,giveplayer);
    SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
    }
    else if(strcmp(x_job,"sachbeschädigung",true) == 0)
    {
    format(string,sizeof(string), "Officer %s hat dich der Beschädigung eines Fahrzeuges überführt!", sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    SetPlayerWantedLevel(giveplayerid,points+1);
    WantedLevel[giveplayerid]+=1;
    WantedPoints[giveplayerid] += 1;
    format(turnmes, sizeof(turnmes), "%s hat %s der Beschädigung eines Fahrzeuges überführt!",sendername,giveplayer);
    SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);


    }
    else if(strcmp(x_job,"zerstörung",true) == 0)
    {
    format(string,sizeof(string), "Officer %s hat dich der Zerstörung eines Fahrzeuges überführt!", sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    SetPlayerWantedLevel(giveplayerid,points+2);
    WantedLevel[giveplayerid]+=2;
    WantedPoints[giveplayerid] += 2;
    format(turnmes, sizeof(turnmes), "%s hat %s der Zerstörung eines Fahrzeuges überführt!",sendername,giveplayer);
    SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);


    }
    else if(strcmp(x_job,"car",true) == 0)
    {
    format(string,sizeof(string), "Officer %s hat dich des fahrens ohne Führerschein überführt!", sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    SetPlayerWantedLevel(giveplayerid,points+1);
    WantedLevel[giveplayerid]+=1;
    WantedPoints[giveplayerid] += 1;
    format(turnmes, sizeof(turnmes), "%s hat %s des fahrens ohne Führerschein überführt!",sendername,giveplayer);
    SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);


    }
    else if(strcmp(x_job,"bike",true) == 0)
    {
    format(string,sizeof(string), "Officer %s hat dich beim fahren eines Motorrad´s ohne gültige License überführt!", sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    SetPlayerWantedLevel(giveplayerid,points+1);
    WantedLevel[giveplayerid]+=1;
    WantedPoints[giveplayerid] += 1;
    format(turnmes, sizeof(turnmes), "%s hat %s beim fahren eines Motorrad´s ohne gültige License überführt!",sendername,giveplayer);
    SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);


    }
    else if(strcmp(x_job,"weapon",true) == 0)
    {
    format(string,sizeof(string), "Officer %s hat dich des besitzes von Waffen ohne License überführt!", sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    SetPlayerWantedLevel(giveplayerid,points+1);
    WantedLevel[giveplayerid]+=2;
    WantedPoints[giveplayerid] += 2;
    format(turnmes, sizeof(turnmes), "%s hat %s des besitzes von Waffen überführt!",sendername,giveplayer);
    SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);


    }
    else if(strcmp(x_job,"lkw",true) == 0)
    {
    format(string,sizeof(string), "Officer %s hat dich beim fahren eines LKW´s überführt ohne gültige Licens!", sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    SetPlayerWantedLevel(giveplayerid,points+1);
    WantedLevel[giveplayerid]+=1;
    WantedPoints[giveplayerid] += 1;
    format(turnmes, sizeof(turnmes), "%s hat %s beim fahren eines LKW´s überführt ohne gültige Licens!",sendername,giveplayer);
    SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
    }
    else if(strcmp(x_job,"fly",true) == 0)
    {
    format(string,sizeof(string), "Officer %s hat dich des fliegens ohne Flugschein überführt!", sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    SetPlayerWantedLevel(giveplayerid,points+1);
    WantedPoints[giveplayerid] += 1;
    WantedLevel[giveplayerid]+=1;
    format(turnmes, sizeof(turnmes), "%s hat %s des fliegens ohne Flugschein überführt!",sendername,giveplayer);
    SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
    }
    else if(strcmp(x_job,"wiederstand",true) == 0)
    {
    format(string,sizeof(string), "Officer %s hat dich des Wiederstand gegen die Staatsgewalt überführt!", sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    SetPlayerWantedLevel(giveplayerid,points+1);
    WantedPoints[giveplayerid] += 1;
    WantedLevel[giveplayerid]+=1;
    format(turnmes, sizeof(turnmes), "%s hat %s des Wiederstand gegen die Staatsgewalt überführt!",sendername,giveplayer);
    SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
    }
    else if(strcmp(x_job,"verweigerung",true) == 0)
    {
    format(string,sizeof(string), "Officer %s hat dich beim Beschädigen eines Fahrzeugs erwischt!", sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    SetPlayerWantedLevel(giveplayerid,points+1);
    WantedLevel[giveplayerid]+=1;
    WantedPoints[giveplayerid] += 1;
    format(turnmes, sizeof(turnmes), "%s hat %s beim Beschädigen eines Fahrzeugs erwischt!",sendername,giveplayer);
    SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
    }
    else if(strcmp(x_job,"demage",true) == 0)
    {
    format(string,sizeof(string), "Officer %s hat dich beim Beschädigen eines Fahrzeugs erwischt!", sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    SetPlayerWantedLevel(giveplayerid,points+1);
    WantedLevel[giveplayerid]+=1;
    WantedPoints[giveplayerid] += 1;
    format(turnmes, sizeof(turnmes), "%s hat %s beim Beschädigen eines Fahrzeugs erwischt!",sendername,giveplayer);
    SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
    }
    else if(strcmp(x_job,"drogenbesitz",true) == 0)
    {
    format(string,sizeof(string), "Officer %s hat dich unter Drogen einfluss überführt!", sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    SetPlayerWantedLevel(giveplayerid,points+1);
    WantedLevel[giveplayerid]+=1;
    WantedPoints[giveplayerid] += 1;
    format(turnmes, sizeof(turnmes), "%s hat %s unter Drogen einfluss überführt!",sendername,giveplayer);
    SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
    }
    else if(strcmp(x_job,"dieb",true) == 0)
    {
    format(string,sizeof(string), "Officer %s hat dich beim Diebstahl eines Fahrzeugs überführt!", sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    SetPlayerWantedLevel(giveplayerid,points+1);
    WantedLevel[giveplayerid]+=1;
    WantedPoints[giveplayerid] += 1;
    format(turnmes, sizeof(turnmes), "%s hat %s beim Diebstahl eines Fahrzeugs überführt!",sendername,giveplayer);
    SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
    }
    else if(strcmp(x_job,"alc",true) == 0)
    {
    format(string,sizeof(string), "Officer %s hat dich beim fahren unter Alkohol einfluss überführt!", sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    SetPlayerWantedLevel(giveplayerid,points+1);
    WantedPoints[giveplayerid] += 1;
    WantedLevel[giveplayerid]+=1;
    format(turnmes, sizeof(turnmes), "%s hat %s beim fahren unter Alkohol einfluss überführt!",sendername,giveplayer);
    SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
    }
    else if(strcmp(x_job,"helm",true) == 0)
    {
    format(string,sizeof(string), "Officer %s hat dich beim fahren eines Motorrades ohne Helm überführt!", sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    SetPlayerWantedLevel(giveplayerid,points+1);
    WantedPoints[giveplayerid] += 1;
    WantedLevel[giveplayerid]+=1;
    format(turnmes, sizeof(turnmes), "%s hat %s beim fahren eines Motorrades ohne Helm überführt!",sendername,giveplayer);
    SendRadioMessage(1,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(2,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(3,COLOR_LIGHTBLUE, turnmes);
    SendRadioMessage(21,COLOR_LIGHTBLUE, turnmes);
    }
    return 1;
    }
    }
    }
    else
    {
    format(string, sizeof(string), "%d ist kein aktiver Spieler.", giveplayerid);
    SendClientMessage(playerid, GRAU, string);
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, "Du bist kein Beamter!");
    }


    }
    return 1;
    }




    Hier noch ein Screen wie mein Wantedsystem
    /fahndungsystem aussieht


  • Ich würde es ganz umsonst machen :) nur leider habe ich grad keine Zeit da ich einen TestServer suche.. und noch andere Dinge erledigen muss


    Meld dich aber trotzdem mal per PM hab da was für dich