2 dialogs involve with each other
#7

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{

    if(dialogid == drinks && response) //
  {
    //
    switch(listitem)
    {
      case 1:
      {
        if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
        GivePlayerMoney(playerid, -1);
        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
      }
      case 2:
      {
        if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
        GivePlayerMoney(playerid, -2);
        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
      }
      case 3:
      {
        if(GetPlayerMoney(playerid) < 3) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
        GivePlayerMoney(playerid, -3);
        SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
      }
    }

		return 1;
}
		{
		if(dialogid == license)
	{
	  if(response)
	  {
	    if(listitem == 0)
	    {
				if(GetPlayerMoney(playerid) < DRIVING_LICENSE_PRICE)
				{
				  SendClientMessage(playerid,yellow," You don't have enough money.");
				  new dtests[] = "1\tDriving License - 800$\n2\tFlying License - 2000$\n3\tGun License - 1200$";
	  				ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Licenses, Chose One:",dtests,"Test","Exit");
				}
				else if(GetPlayerMoney(playerid) >= DRIVING_LICENSE_PRICE)
				{
				  GivePlayerMoney(playerid,-DRIVING_LICENSE_PRICE);
				  SendClientMessage(playerid,yellow," Hint: Get a car from the park to start the test.");
					PlayerInfo[playerid][DrivingTest] = 1;
				}
			}
			else if(listitem == 1)
	    {
				if(GetPlayerMoney(playerid) < FLYING_LICENSE_PRICE)
				{
				  SendClientMessage(playerid,yellow," You don't have enough money.");
				  new dtests[] = "1\tDriving License - 800$\n2\tFlying License - 2000$\n3\tGun License - 1200$";
	  				ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Licenses, Chose One:",dtests,"Test","Exit");
				}
				else if(GetPlayerMoney(playerid) >= FLYING_LICENSE_PRICE)
				{
				  GivePlayerMoney(playerid,-FLYING_LICENSE_PRICE);
				  SendClientMessage(playerid,yellow," Hint: Get a shamal from the San Fiero Airport to start the test.");
					PlayerInfo[playerid][FlyingTest] = 1;
				}
			}
			else if(listitem == 2)
	    {
				if(GetPlayerMoney(playerid) < GUN_LICENSE_PRICE)
				{
				  SendClientMessage(playerid,yellow," You don't have enough money.");
				  new dtests[] = "1\tDriving License - 800$\n2\tFlying License - 2000$\n3\tGun License - 1200$";
	  				ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Licenses, Chose One:",dtests,"Test","Exit");
				}
				else if(GetPlayerMoney(playerid) >= GUN_LICENSE_PRICE)
				{
				  GivePlayerMoney(playerid,-FLYING_LICENSE_PRICE);
				  SendClientMessage(playerid,yellow," You have bought the gun license.Type /sl to show it!");
					PlayerInfo[playerid][GunLicense] = 1;
				}
			}
		}
	}
		return 1;
} }
I hope that's enough
Reply


Messages In This Thread
2 dialogs involve with each other - by Jochemd - 05.04.2010, 07:26
Re: 2 dialogs involve with each other - by AiVAMAN - 05.04.2010, 07:27
Re: 2 dialogs involve with each other - by Jochemd - 05.04.2010, 07:31
Re: 2 dialogs involve with each other - by scott1 - 05.04.2010, 07:56
Re: 2 dialogs involve with each other - by Jochemd - 05.04.2010, 08:00
Re: 2 dialogs involve with each other - by scott1 - 05.04.2010, 08:01
Re: 2 dialogs involve with each other - by Jochemd - 05.04.2010, 08:28
Re: 2 dialogs involve with each other - by scott1 - 05.04.2010, 08:36
Re: 2 dialogs involve with each other - by Jochemd - 05.04.2010, 08:45

Forum Jump:


Users browsing this thread: 1 Guest(s)