[HILFE]/wanted für ARMY

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
  • Wie kann ich machen bzw. was muss ich machen das Army auch /wanted machen kann.
    /makeleader (id) 1 = cop
    /makeleader (id) 2 = FBI
    /makeleader (id) 3 = ARMY


    if(strcmp(cmd, "/wanted", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(gTeam[playerid] == 2 || IsACop(playerid))
    {
    new x;
    SendClientMessage(playerid, COLOR_GREEN, "____Wantedliste____");
    for(new i=0; i < MAX_PLAYERS; i++) {
    if(IsPlayerConnected(i))
    {
    if(WantedLevel[i] > 0)
    {
    GetPlayerName(i, giveplayer, sizeof(giveplayer));
    format(string, sizeof(string), "%s%s: %d", string,giveplayer,WantedLevel[i]);
    x++;
    if(x > 3) {
    SendClientMessage(playerid, COLOR_LIGHTBLUE, 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, COLOR_LIGHTBLUE, string);
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " You're not a Cop / FBI / National Guard !");
    }
    }//not connected
    return 1;
    }


    MfG
    Danke im Vorraus

  • if(gTeam[playerid] == 2 || IsACop(playerid) || gTeam[playerid] == 3)


    Ganze script:


    if(strcmp(cmd, "/wanted", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(gTeam[playerid] == 2 || IsACop(playerid) || gTeam[playerid] == 3)
    {
    new x;
    SendClientMessage(playerid, COLOR_GREEN, "____Wantedliste____");
    for(new i=0; i < MAX_PLAYERS; i++) {
    if(IsPlayerConnected(i))
    {
    if(WantedLevel[i] > 0)
    {
    GetPlayerName(i, giveplayer, sizeof(giveplayer));
    format(string, sizeof(string), "%s%s: %d", string,giveplayer,WantedLevel[i]);
    x++;
    if(x > 3) {
    SendClientMessage(playerid, COLOR_LIGHTBLUE, 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, COLOR_LIGHTBLUE, string);
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " You're not a Cop / FBI / National Guard !");
    }
    }//not connected
    return 1;
    }