/clear geht nicht?o.o

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
  • /clear geht nicht also das /clear wo man wanted wegmachen kann...
    Hir mal der ausschnitt


    if(strcmp(cmd, "/clear", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    new member = PlayerInfo[playerid][pMember];
    new leader = PlayerInfo[playerid][pLeader];
    new rank = PlayerInfo[playerid][pRank];
    if(gTeam[playerid] == 2)
    {
    if (!PlayerToPoint(3.0, playerid, 253.9280,69.6094,1003.6406))
    {
    SendClientMessage(playerid, COLOR_GRAD2, " Du bist nicht in der Polizeistation!");
    return 1;
    }
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD1, "BENUTZUNG: /clear [playerid/PartOfName]");
    return 1;
    }
    giveplayerid = ReturnUser(tmp);
    if(IsPlayerConnected(giveplayerid))
    {
    if(giveplayerid != INVALID_PLAYER_ID)
    {
    if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Du kannst dich nicht selbst clearen!"); return 1; }
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "* You cleared the Records and Wanted Points of %s.", giveplayer);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* Officer %s has cleared your Records and Wanted Points.", sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    WantedPoints[giveplayerid] = 0;
    WantedLevel[giveplayerid] = 0;
    ClearCrime(giveplayerid);
    if(gTeam[giveplayerid]==4)
    {
    gTeam[giveplayerid] = 3;
    SetPlayerToTeamColor(giveplayerid);
    }
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Invalid ID/Name!");
    }
    }
    else if(member == 13||member == 13||leader == 13||leader == 13)
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD1, "BENUTZUNG: /clear [playerid/PartOfName]");
    return 1;
    }
    giveplayerid = ReturnUser(tmp);
    if(IsPlayerConnected(giveplayerid))
    {
    if(giveplayerid != INVALID_PLAYER_ID)
    {
    if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot Clear yourself!"); return 1; }
    if(rank < 4) { SendClientMessage(playerid, COLOR_GREY, " You need Rank 4 to clear someone's Wanted Points + Records !"); return 1; }
    if(GetPlayerMoney(playerid) < 5000) { SendClientMessage(playerid, COLOR_GREY, " You need $5000 to Clear your Family Member !"); return 1; }
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    if(member > 0)
    {
    if(PlayerInfo[giveplayerid][pMember] != member)
    {
    SendClientMessage(playerid, COLOR_GREY, " That player is not in your Family !");
    return 1;
    }
    format(string, sizeof(string), "* You cleared the Records and Wanted Points of %s for $5000.", giveplayer);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* Family Member %s with Rank %d, has cleared your Records and Wanted Points.", sendername, rank);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    }
    else if(leader > 0)
    {
    if(PlayerInfo[giveplayerid][pMember] != leader)
    {
    SendClientMessage(playerid, COLOR_GREY, " That player is not in your Family !");
    return 1;
    }
    format(string, sizeof(string), "* You cleared the Records and Wanted Points of %s for $5000.", giveplayer);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* Family Leader %s, has cleared your Records and Wanted Points.", sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    }
    WantedPoints[giveplayerid] = 0;
    WantedLevel[giveplayerid] = 0;
    ClearCrime(giveplayerid);
    PlayerMoney[playerid] -= 500000;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Invalid ID/Name!");
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " You are not an Cop / FBI / National Guard / Family Member !");
    }
    }//not connected
    return 1;
    }


    Noch ein Problem ^^


    Beim Compilen von meinem GM grieg ich 1Error


    C:\Dokumente und Einstellungen\Anwender\Desktop\GGF.pwn(875) : error 001: expected token: "-identifier-", but found ","
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    1 Error.


    Ich weiß das es bedeutet irgend wo fehlt was zb ein , oder ; aber das problem ist bei 30tausend zeilen diesen winzigen fehler zu finden...
    Villt habt ihr ja paar tips ^^


    Lg alex

    DIK2gXr.png

    3 Mal editiert, zuletzt von DurtyFree ()

  • Meine /pay Funktion:


    if(strcmp(cmd, "/pay", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Nutze: /pay [playerid/TeildesNamens] [Betrag]");
    return 1;
    }
    //giveplayerid = strval(tmp);
    giveplayerid = ReturnUser(tmp);
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Nutze: /pay [playerid/TeildesNamens] [Betrag]");
    return 1;
    }
    moneys = strval(tmp);
    if(moneys > 1000 && PlayerInfo[playerid][pLevel] < 2)
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Du musst Level 2 oder höher sein um mehr als 1000$ bezahlen zu können");
    return 1;
    }
    if(moneys < 1 || moneys > 99999)
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Geh nicht unter 1$ oder über 999.999$");
    return 1;
    }
    if (IsPlayerConnected(giveplayerid))
    {
    if(giveplayerid != INVALID_PLAYER_ID)
    {
    if(PlayerInfo[giveplayerid][pLocal] == 106)
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Command hier nicht erlaubt");
    return 1;
    }
    if (ProxDetectorS(5.0, playerid, giveplayerid))
    {
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    playermoney = GetPlayerMoney(playerid);
    if (moneys > 0 && playermoney >= moneys)
    {
    ConsumingMoney[giveplayerid] = 1;
    GivePlayerMoney(playerid, (0 - moneys));
    GivePlayerMoney(giveplayerid, moneys);
    format(string, sizeof(string), " Du hast %s(spieler: %d) %d$ gegeben.", giveplayer,giveplayerid, moneys);
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    SendClientMessage(playerid, COLOR_GRAD1, string);
    format(string, sizeof(string), " Du hast %d$ von %s(spieler: %d) erhalten.", moneys, sendername, playerid);
    SendClientMessage(giveplayerid, COLOR_GRAD1, string);
    format(string, sizeof(string), "%s hat %d$ aus seinem Portmonai genommen und %s gegeben", sendername, moneys, giveplayer);
    PayLog(string);
    if(moneys >= 1000000)
    {
    ABroadCast(COLOR_YELLOW,string,1);
    }
    PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
    format(string, sizeof(string), "* %s hat etwas Geld aus seinem Portmonai genommen und es %s gegeben.", sendername ,giveplayer);
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD1, " Ungültiger Überweißungsbetrag.");
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD1, " Du bist zu weit weg.");
    }
    }//invalid id
    }
    else
    {
    format(string, sizeof(string), " %d ist kein aktiver Spieler.", giveplayerid);
    SendClientMessage(playerid, COLOR_GRAD1, string);
    }
    }
    return 1;
    }

  • was soll der müll mit:"Hoffentlich hilft dir keiner?" WIr sind hier ne COmmunity da hilft jeder jeden, grade weil wir zum helfen und zum fragen hier sind