OnDialogResponse help
#1

Код:
 {

	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)
    {
	   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");
		  }
      }
   }
    if(dialogid == 20322 && response)
    {
		switch(listitem)
		{
			case 0:
			{

			   ShowPlayerDialog(playerid, 20322, DIALOG_STYLE_LIST, "Banka - Zavalimo te u kredit", "Mali(10,000$\nVeliki($100,000$)", "Uh,Jebote!", "Necu!");
            }
        }
    }
    if (dialogid == 20322 && response)
    {
	   switch(listitem)
	   {
		  case 0:
		  {
		  if(GetPlayerMoney(playerid) < 0) return SendClientMessage(playerid, 0xFF0000, "Ni mi ti nemozemo pomoc");
		  GivePlayerWeapon(playerid, 22,100);
		  GivePlayerMoney(playerid, 10000);
		  SendClientMessage(playerid, 0x99FFFF, "Ima da sutra castis kafanu, UDRI BRIGU NA VESELJE!");
		  }
		  case 1:
		  {
		  if(GetPlayerMoney(playerid) < 10) return SendClientMessage(playerid, 0xFF0000, "Pas mater,uu.");
		  GivePlayerWeapon(playerid, 23, 100);
		  GivePlayerMoney(playerid, 100000);
		  SendClientMessage(playerid, 0x99FFFF, "Vozi misko");
		  }
      }
   }

    return 1;
}
So I have this script ( I'm learning pawno, and I really want to learn it, because I'm interested in it. Now, the problem is;
I got ZCMD CMD1st dialog)oruzije and (2nd dialog) kredit, now when I type /kredit, it does display the right dialog, but the functions of the dialog aren't correct, like it says "Bro you broke" and stuff, it gives me both money and 9mm or silenced, should I change cases or?
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: 1 Guest(s)