/Su grud geht 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 Forum ich habe schon seit längerem das /su system drin aber der grund will icht kann sich das jamand mal ankucken


    //===============================SUSPECT========================================
    if(strcmp(cmd, "/suspect", true) == 0 || strcmp(cmd, "/su", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {


    new x_job[128];
    if(OnDuty[playerid]==0)
    {
    SendClientMessage(playerid, COLOR_GREY, "Du bist kein Beamter!");
    return 1;
    }
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Verwendung: (/su)spect [Playerid] [Anzahl] [Grund] ");
    return 1;
    }
    x_job = strtok(cmdtext, idx);
    if(!strlen(x_job ))
    {
    SendClientMessage(playerid, COLOR_GRAD1, " /suspect [Playerid/Name] [Anzahl] [Grund] ");
    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);
    new length = strlen(cmdtext);
    while ((idx < length) && (cmdtext[idx] <= ' '))
    {
    idx++;
    }

    new offset = idx;

    new result[64];

    while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
    {
    result[idx - offset] = cmdtext[idx];
    idx++;
    }
    result[idx - offset] = EOS;
    if(!strlen(result))
    if (gTeam[playerid] == 2 || IsACop(playerid))
    {
    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,COLOR_GRAD2,"Der Spieler hat schon 6 Wanteds");
    return 1;
    }
    else if(strcmp(x_job,"1",true) == 0)
    {
    format(turnmes,sizeof(turnmes), "Officer %s hat dir 1 Wanted gegeben! Grund: %s", sendername,result);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, turnmes);
    SetPlayerWantedLevel(giveplayerid,points+1);
    WantedPoints[giveplayerid] += 1;
    WantedLevel[giveplayerid]+=1;
    format(turnmes, sizeof(turnmes), "%s hat %s 1 Wanted gegeben! Grund: %s",sendername,giveplayer,result);
    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,"2",true) == 0)
    {
    format(string,sizeof(string), "Officer %s hat dir 2 Wanteds gegeben!! Grund: %s", sendername,result);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    SetPlayerWantedLevel(giveplayerid,points+2);
    WantedPoints[giveplayerid] += 2;
    WantedLevel[giveplayerid]+=2;
    format(turnmes, sizeof(turnmes), "%s hat %s die 2 Wandeds gegeben! Grund: %s",sendername,giveplayer,result);
    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,"3",true) == 0)
    {
    format(string,sizeof(string), "Officer %s hat dir 3 Wanteds gegeben! Grund: %s", sendername,result);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    SetPlayerWantedLevel(giveplayerid,points+3);
    WantedPoints[giveplayerid] += 3;
    WantedLevel[giveplayerid]+=3;
    format(turnmes, sizeof(turnmes), "%s hat %s 3 Wanteds!! Grund: %s",sendername,giveplayer,result);
    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,"4",true) == 0)
    {
    format(string,sizeof(string), "Officer %s hat dir 4 Wanteds gegeben! Grund: %s", sendername,result);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    SetPlayerWantedLevel(giveplayerid,points+4);
    WantedPoints[giveplayerid] += 4;
    WantedLevel[giveplayerid]+=4;
    format(turnmes, sizeof(turnmes), "%s hat %s 4 Wanteds gegeben! Grund: %s",sendername,giveplayer,result);
    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,"5",true) == 0)
    {
    format(string,sizeof(string), "Officer %s hat dir 5 Wanteds gegeben! Grund: %s", sendername,result);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    SetPlayerWantedLevel(giveplayerid,points+5);
    WantedPoints[giveplayerid] += 5;
    WantedLevel[giveplayerid]+=5;
    format(turnmes, sizeof(turnmes), "%s hat %s 5 Wantedsl gegeben! Grund: %s",sendername,giveplayer,result);
    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,"6",true) == 0)
    {
    format(string,sizeof(string), "Officer %s hat dir 6 Wanteds gegeben! Grund: %s", sendername,result);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    SetPlayerWantedLevel(giveplayerid,points+6);
    WantedLevel[giveplayerid]+=6;
    WantedPoints[giveplayerid] += 6;
    format(turnmes, sizeof(turnmes), "%s hat %s 6 Wanteds gegeben! Grund: %s",sendername,giveplayer,result);
    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, COLOR_GRAD1, string);
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Du bist kein Beamter!");
    }


    }
    return 1;
    }

    ↓Das ist der Youtube Channel von mir und meinen Kollegen↓



    Sa-Mp Server [Im Aufbau/Beta]
    128.65.216.200:7777