/breakout

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
  • else if(strcmp(x_job,"breakout",true) == 0)
    {
    if(LawOffer[playerid] < 999)
    {
    if(GetPlayerMoney(playerid) > LawPrice[playerid])
    {
    if(IsPlayerConnected(LawOffer[playerid]))
    {
    GetPlayerName(LawOffer[playerid], giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "* You accepted the breakout for $%d from Anwalt %s.",LawPrice[playerid],giveplayer);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* %s accepted your breakout and the $%d was added to your PayCheck.",sendername,LawPrice[playerid]);
    SendClientMessage(LawOffer[playerid], COLOR_LIGHTBLUE, string);
    PlayerInfo[LawOffer[playerid]][pPayCheck] += LawPrice[playerid];
    GivePlayerMoney(playerid, -LawPrice[playerid]);
    LawOffer[playerid] = 999;
    LawPrice[playerid] = 0;
    return 1;
    }
    return 1;
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " You can't afford the breakout !");
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " No-one offerd you any breakout!");
    return 1;
    }
    }
    /acceot Breakout funz net warum?


    Kommt immer:
    SendClientMessage(playerid, COLOR_GREY, " No-one offerd you any breakout!");

  • eig ist da kein fehler drinn versuch mal ohne die leerzeichen


    SendClientMessage(playerid, COLOR_GREY, "No-one offerd you any breakout!");

  • Ja egal was ich mach. Ich mach als Anwalt /breakoit ID Preis. UNd jez kommt immer bei /acceot Breakout, "no-one etc.^^

  • else if(strcmp(x_job,"breakout",true) == 0)
    {
    if(LawOffer[playerid] < 0)
    {
    if(GetPlayerMoney(playerid) > LawPrice[playerid])
    {
    if(IsPlayerConnected(LawOffer[playerid]))
    {
    GetPlayerName(LawOffer[playerid], giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "* You accepted the breakout for $%d from Anwalt %s.",LawPrice[playerid],giveplayer);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* %s accepted your breakout and the $%d was added to your PayCheck.",sendername,LawPrice[playerid]);
    SendClientMessage(LawOffer[playerid], COLOR_LIGHTBLUE, string);
    PlayerInfo[LawOffer[playerid]][pPayCheck] += LawPrice[playerid];
    GivePlayerMoney(playerid, -LawPrice[playerid]);
    LawOffer[playerid] = 999;
    LawPrice[playerid] = 0;
    return 1;
    }
    return 1;
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " You can't afford the breakout !");
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " No-one offerd you any breakout!");
    return 1;
    }
    }


    probirs so

    Der Server: [GRG]Grand Racing Game wurde 2014 Eingestampft.
    Weitere Infos: Klick Mich

  • else if(strcmp(x_job,"breakout",true) == 0)
    {
    if(LawOffer[playerid] < 9999)
    {
    if(GetPlayerMoney(playerid) > LawPrice[playerid])
    {
    if(IsPlayerConnected(LawOffer[playerid]))
    {
    GetPlayerName(LawOffer[playerid], giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "* You accepted the breakout for $%d from Anwalt %s.",LawPrice[playerid],giveplayer);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* %s accepted your breakout and the $%d was added to your PayCheck.",sendername,LawPrice[playerid]);
    SendClientMessage(LawOffer[playerid], COLOR_LIGHTBLUE, string);
    PlayerInfo[LawOffer[playerid]][pPayCheck] += LawPrice[playerid];
    GivePlayerMoney(playerid, -LawPrice[playerid]);
    LawOffer[playerid] = 999;
    LawPrice[playerid] = 0;
    return 1;
    }
    return 1;
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " You can't afford the breakout !");
    return 1;
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " No-one offerd you any breakout!");
    return 1;
    }
    }

    Der Server: [GRG]Grand Racing Game wurde 2014 Eingestampft.
    Weitere Infos: Klick Mich

  • Wie KeksOf Death schon gesagt hat liegt der Fehler, dass dieser Befehl kommt am /breakout Befehl und nicht am /accept Befehl.


    new LawOffer[MAX_PLAYERS];
    // in OnPlayerConnect
    LawOffer[playerid] = 999;
    // im /breakout Befehl
    LawOffer[giveplayerid] = playerid // Oder je nachdem was du anstatt giveplayerid verwendest im /breakout Befehl