Dialog Abbrechen?

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
  • hier der ganze code der da ist


    Spoiler anzeigen
    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    if(dialogid == DIALOG_WAFFEN)
    {
    if(listitem == 0)
    {
    ShowPlayerDialog(playerid,DIALOG_STURMGEWEHR,DIALOG_STYLE_LIST,"Sturmgewehre","M4\nAK47","Kaufen","Abbrechen");
    }
    if(listitem == 1)
    {
    ShowPlayerDialog(playerid,DIALOG_PISTOLEN,DIALOG_STYLE_LIST,"Pistolen","Pistole\nS-Pistole\nDesert-Eagle","Kaufen","Abbrechen");
    }
    if(listitem == 2)
    {
    ShowPlayerDialog(playerid,DIALOG_SCHROTTFLINTEN,DIALOG_STYLE_LIST,"Schrottflinten","Schrottflinte\nAbgesaegte-Flinte\nCombat-Schrottflinte","Kaufen","Abbrechen");
    }
    }
    if(listitem == 3)
    {
    ShowPlayerDialog(playerid,DIALOG_HANDWAFFEN,DIALOG_STYLE_LIST,"Handwaffen","Schlagring\nGolf-Schlaeger\nMesser\nBaseballschläger\nSchaufel\nKatana\nKettensäge\nDildo1\nDildo2\nVibrator1\nVibrator2\nBlumen\nRohrstock","Kaufen","Abbrechen");
    }
    if(listitem == 4)
    {
    ShowPlayerDialog(playerid,DIALOG_WURFWAFFEN,DIALOG_STYLE_LIST,"Wurfwaffen","Granate\nTränen Gas\nMolotov Cocktail","Kaufen","Abbrechen");
    }
    if(dialogid == DIALOG_STURMGEWEHR) //1
    {
    if(listitem == 0)
    {
    GivePlayerWeapon(playerid,31,500);
    }
    if(listitem == 1)
    {
    GivePlayerWeapon(playerid,30,500);
    }
    }
    if(dialogid == DIALOG_PISTOLEN) //2
    {
    if(listitem == 0)
    {
    GivePlayerWeapon(playerid,22,500);
    }
    if(listitem == 1)
    {
    GivePlayerWeapon(playerid,23,500);
    }
    if(listitem == 2)
    {
    GivePlayerWeapon(playerid,24,500);
    }
    }
    if(dialogid == DIALOG_SCHROTTFLINTEN) //3
    {
    if(listitem == 0)
    {
    GivePlayerWeapon(playerid,25,500);
    }
    if(listitem == 1)
    {
    GivePlayerWeapon(playerid,26,500);
    }
    if(listitem == 2)
    {
    GivePlayerWeapon(playerid,27,500);
    }
    }
    if(dialogid == DIALOG_HANDWAFFEN) //4
    {
    if(listitem == 0)
    {
    GivePlayerWeapon(playerid,1,1);
    }
    if(listitem == 1)
    {
    GivePlayerWeapon(playerid,2,1);
    }
    if(listitem == 2)
    {
    GivePlayerWeapon(playerid,4,1);
    }
    if(listitem == 3)
    {
    GivePlayerWeapon(playerid,5,1);
    }
    if(listitem == 4)
    {
    GivePlayerWeapon(playerid,6,1);
    }
    if(listitem == 5)
    {
    GivePlayerWeapon(playerid,8,1);
    }
    if(listitem == 6)
    {
    GivePlayerWeapon(playerid,9,1);
    }
    if(listitem == 7)
    {
    GivePlayerWeapon(playerid,10,1);
    }
    if(listitem == 8)
    {
    GivePlayerWeapon(playerid,11,1);
    }
    if(listitem == 9)
    {
    GivePlayerWeapon(playerid,12,1);
    }
    if(listitem == 10)
    {
    GivePlayerWeapon(playerid,13,1);
    }
    if(listitem == 11)
    {
    GivePlayerWeapon(playerid,14,1);
    }
    if(listitem == 12)
    {
    GivePlayerWeapon(playerid,15,1);
    }
    }
    if(dialogid == DIALOG_WURFWAFFEN) //5
    {
    if(listitem == 0)
    {
    GivePlayerWeapon(playerid,16,100);
    }
    if(listitem == 1)
    {
    GivePlayerWeapon(playerid,17,100);
    }
    if(listitem == 2)
    {
    GivePlayerWeapon(playerid,18,100);
    }
    }
    return 1;
    }

  • Bitteschön:

    Spoiler anzeigen

    Extra eingerückt ;)

    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    if(dialogid == DIALOG_WAFFEN)
    {
    if(response == 1)//wenn er den ersten(linken)knopf drückt
    {
    if(listitem == 0)
    {
    ShowPlayerDialog(playerid,DIALOG_STURMGEWEHR,DIALOG_STYLE_LIST,"Sturmgewehre","M4\nAK47","Kaufen","Abbrechen");
    }
    if(listitem == 1)
    {
    ShowPlayerDialog(playerid,DIALOG_PISTOLEN,DIALOG_STYLE_LIST,"Pistolen","Pistole\nS-Pistole\nDesert-Eagle","Kaufen","Abbrechen");
    }
    if(listitem == 2)
    {
    ShowPlayerDialog(playerid,DIALOG_SCHROTTFLINTEN,DIALOG_STYLE_LIST,"Schrottflinten","Schrottflinte\nAbgesaegte-Flinte\nCombat-Schrottflinte","Kaufen","Abbrechen");
    }
    if(listitem == 3)
    {
    ShowPlayerDialog(playerid,DIALOG_HANDWAFFEN,DIALOG_STYLE_LIST,"Handwaffen","Schlagring\nGolf-Schlaeger\nMesser\nBaseballschläger\nSchaufel\nKatana\nKettensäge\nDildo1\nDildo2\nVibrator1\nVibrator2\nBlumen\nRohrstock","Kaufen","Abbrechen");
    }
    if(listitem == 4)
    {
    ShowPlayerDialog(playerid,DIALOG_WURFWAFFEN,DIALOG_STYLE_LIST,"Wurfwaffen","Granate\nTränen Gas\nMolotov Cocktail","Kaufen","Abbrechen");
    }
    }
    else//alles andere also eben halt den rechten abbrechen knopf
    {
    SendClientMessage(playerid,farbe,"Kauf abgebrochen!"); //zum Beispiel
    }
    }
    if(dialogid == DIALOG_STURMGEWEHR) //1
    {
    if(response == 1)
    {
    if(listitem == 0)
    {
    GivePlayerWeapon(playerid,31,500);
    }
    if(listitem == 1)
    {
    GivePlayerWeapon(playerid,30,500);
    }
    }//kann man natürlich auch weg lassen
    }
    if(dialogid == DIALOG_PISTOLEN) //2
    {
    if(response == 1)
    {
    if(listitem == 0)
    {
    GivePlayerWeapon(playerid,22,500);
    }
    if(listitem == 1)
    {
    GivePlayerWeapon(playerid,23,500);
    }
    if(listitem == 2)
    {
    GivePlayerWeapon(playerid,24,500);
    }
    }
    }
    if(dialogid == DIALOG_SCHROTTFLINTEN) //3
    {
    if(response == 1)
    {
    if(listitem == 0)
    {
    GivePlayerWeapon(playerid,25,500);
    }
    if(listitem == 1)
    {
    GivePlayerWeapon(playerid,26,500);
    }
    if(listitem == 2)
    {
    GivePlayerWeapon(playerid,27,500);
    }
    }
    }
    if(dialogid == DIALOG_HANDWAFFEN) //4
    {
    if(response == 1)
    {
    if(listitem == 0)
    {
    GivePlayerWeapon(playerid,1,1);
    }
    if(listitem == 1)
    {
    GivePlayerWeapon(playerid,2,1);
    }
    if(listitem == 2)
    {
    GivePlayerWeapon(playerid,4,1);
    }
    if(listitem == 3)
    {
    GivePlayerWeapon(playerid,5,1);
    }
    if(listitem == 4)
    {
    GivePlayerWeapon(playerid,6,1);
    }
    if(listitem == 5)
    {
    GivePlayerWeapon(playerid,8,1);
    }
    if(listitem == 6)
    {
    GivePlayerWeapon(playerid,9,1);
    }
    if(listitem == 7)
    {
    GivePlayerWeapon(playerid,10,1);
    }
    if(listitem == 8)
    {
    GivePlayerWeapon(playerid,11,1);
    }
    if(listitem == 9)
    {
    GivePlayerWeapon(playerid,12,1);
    }
    if(listitem == 10)
    {
    GivePlayerWeapon(playerid,13,1);
    }
    if(listitem == 11)
    {
    GivePlayerWeapon(playerid,14,1);
    }
    if(listitem == 12)
    {
    GivePlayerWeapon(playerid,15,1);
    }
    }
    }
    if(dialogid == DIALOG_WURFWAFFEN) //5
    {
    if(response == 1)
    {
    if(listitem == 0)
    {
    GivePlayerWeapon(playerid,16,100);
    }
    if(listitem == 1)
    {
    GivePlayerWeapon(playerid,17,100);
    }
    if(listitem == 2)
    {
    GivePlayerWeapon(playerid,18,100);
    }
    }
    }
    return 1;
    }