Dialogs
#8

Quote:
Originally Posted by deather
Код:
f (dialogid == 3) //checking dialogid
  {
    if (response == 1) //warp has been pressed
    {
      switch (listitem) //a switch, not going to explain it here
      {
        case 0: {
        GivePlayerWeapon(playerid, 24, 50);//AntiHack(playerid, -800);ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Gun Menu", "Desert Eagle $800 \nShotgun $350 \nCountry Rifle $350 \nBrass Knuckles $50", "Buy", "Exit"); 
         }
        case 1: {
        GivePlayerWeapon(playerid, 25, 10);//AntiHack(playerid, -350);ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Gun Menu", "Desert Eagle $800 \nShotgun $350 \nCountry Rifle $350 \nBrass Knuckles $50", "Buy", "Exit");
         }
        case 2: {
        GivePlayerWeapon(playerid, 33, 50);//AntiHack(playerid, -350);ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Gun Menu", "Desert Eagle $800 \nShotgun $350 \nCountry Rifle $350 \nBrass Knuckles $50", "Buy","Exit"); 
         }
        case 3: {
        GivePlayerWeapon(playerid, 1, 1);//AntiHack(playerid, -50);ShowPlayerDialog(playerid, 3,DIALOG_STYLE_LIST, "Gun Menu", "Desert Eagle $800 \nShotgun $350 \nCountry Rifle $350 \nBrass Knuckles $50", "Buy","Exit");
         }
      }
      SendClientMessage(playerid, 0xFFFFFFFF, "Gun Purchased"); //a message to confirm the warp
    }
    if(response == 0)
    {
    TogglePlayerControllable(playerid, 1);
    SetPlayerPos(playerid, 1366.3450,-1278.8975,13.5469);
    SetPlayerInterior(playerid,0);
    }
    return 1; //returns 1, it has been handled
  }
  return 0;
}
Try this. You have got those errors cause you havent added brakets at cases.
I think you will get warning because of loose indentation only.
I looked at another scirpt and did it the way you said, I had no problems. Thank you for replying.
Reply


Messages In This Thread
Dialogs - by ihatetn931 - 15.01.2010, 17:21
Re: Dialogs - by ihatetn931 - 18.01.2010, 14:25
Re: Dialogs - by deather - 18.01.2010, 15:28
Re: Dialogs - by ihatetn931 - 18.01.2010, 15:30
Re: Dialogs - by deather - 18.01.2010, 15:36
Re: Dialogs - by ihatetn931 - 18.01.2010, 15:41
Re: Dialogs - by deather - 18.01.2010, 17:13
Re: Dialogs - by ihatetn931 - 18.01.2010, 17:24
Re: Dialogs - by deather - 18.01.2010, 17:25

Forum Jump:


Users browsing this thread: 1 Guest(s)