OnDialogResponse help
#3

Your dialogids are the same.. here's an example of how to do a dialog:

pawn Код:
if(dialogid == 1)
{
    if(response)
    {
        ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Title", "Black\nWhite", "Select", "Cancel");
    }
}
else if(dialogid == 2)
{
    if(response)
    {
        switch(listitem)
        {
            case 1: //black
            case 2: //white
        }
    }
}
Don't copy and paste that as I didn't test it, but hopefully you understand how you need to change the dialog ids.


Edit:
pawn Код:
if(dialogid == 20321 && response)
    {
        switch(listitem)
        {
            case 0:
            {
               ShowPlayerDialog(playerid, 20321, DIALOG_STYLE_LIST, "Take a look at my other 44's", "9mm($1000)\nSilenced 9mm($2000)", "OMGYES", "NNO!");
            }
        }
    }
    if (dialogid == 20321 && response) // See how you already have 20321 above? it needs to be a different id.
    {
       switch(listitem)
       {
          case 0:
          {
            if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, 0xFF0000, "Bro you broke");
            GivePlayerWeapon(playerid, 22,100);
            GivePlayerMoney(playerid, -1000);
            SendClientMessage(playerid, 0x99FFFF, "Let's kick some ass.");
          }
          case 1:
          {
            if(GetPlayerMoney(playerid) < 2000) return SendClientMessage(playerid, 0xFF0000, "Bro you broke");
            GivePlayerWeapon(playerid, 23, 100);
            GivePlayerMoney(playerid, -2000);
            SendClientMessage(playerid, 0x99FFFF, "Kick some silenced ass");
          }
      }
   }
Read the comment I inserted, it might help you understand.
Reply


Messages In This Thread
OnDialogResponse help - by Bek_Loking - 25.05.2014, 11:02
Re: OnDialogResponse help - by Bingo - 25.05.2014, 11:04
Re: OnDialogResponse help - by Jack_Leslie - 25.05.2014, 11:09
Re: OnDialogResponse help - by Adityz - 25.05.2014, 11:11
Re: OnDialogResponse help - by Bek_Loking - 25.05.2014, 11:13
Re: OnDialogResponse help - by Jack_Leslie - 25.05.2014, 11:15
Re: OnDialogResponse help - by Bek_Loking - 25.05.2014, 11:17
Re: OnDialogResponse help - by Jack_Leslie - 25.05.2014, 11:19
Re: OnDialogResponse help - by Bek_Loking - 25.05.2014, 11:21
Re: OnDialogResponse help - by Jack_Leslie - 25.05.2014, 11:24

Forum Jump:


Users browsing this thread: 6 Guest(s)