Dialog not appearing
#1

So we've been working on this command so you can buy weapons and for some reason it's not working correctly does anyone see the problem?
OnPlayerCommandText:
pawn Код:
if(strcmp(cmd, "/buy", true) == 0)
        {
            if(IsPlayerInRangeOfPoint(playerid, 5.0, 1480.82, -1789.80, 156.75))
            {
                ShowPlayerDialog(playerid, 99999, DIALOG_STYLE_LIST, "Weapon Store", "Melee\nPistols\nClose Range\nAssault\nExplosives", "Select", "Cancel");
            }
            else
            {
                SendClientMessage(playerid, BLANCO, "You are not at any weapons store!");
            }
            return 1;
        }
OnDialogResponse:
pawn Код:
if(dialogid == 99999)
        {
            if(response == 1)
            {
//              switch(listitem)
//              {
                    if(listitem == 0)
                    {
                        ShowPlayerDialog(playerid, 99998, DIALOG_STYLE_LIST, "Melee Weapons", "Golf Club   (3 Chips)\nNite Stick   (7 Chips)\nKnife    (10 Chips)\nBaseball Bat    (12 Chips)\nShovel  (15 Chips)\nPool Cue    (17 Chips)\nKatana  (20 Chips)", "Purchase", "Cancel");
                    }
                    if(listitem == 1)
                    {
                        ShowPlayerDialog(playerid, 99997, DIALOG_STYLE_LIST, "Pistols", "9mm   (15 Chips)\nDesert Eagle    (20 Chips)", "Purchase", "Cancel");
                    }
                    if(listitem == 2)
                    {
                        ShowPlayerDialog(playerid, 99996, DIALOG_STYLE_LIST, "Close Range Weapons", "Shotgun    (20 Chips)\nSawn-off Shotgun    (40 Chips)\nCombat Shotgun  (60 Chips)\nFlamethrower    (300 Chips)", "Purchase", "Cancel");
                    }
                    if(listitem == 3)
                    {
                        ShowPlayerDialog(playerid, 99995, DIALOG_STYLE_LIST, "Assault Weapons", "MP5  (20 Chips)\nAK47    (60 Chips)\nM4  (75 Chips)", "Purchase", "Cancel");
                    }
                    if(listitem == 4)
                    {
                        ShowPlayerDialog(playerid, 99994, DIALOG_STYLE_LIST, "Explosives", "Molotov   (120 Chips)\nGrenades (300 Chips)", "Purchase", "Cancel");
                    }
//              }
            }
            return 1;
        }

Your help would be greatly appreciated. +1
Reply


Messages In This Thread
Dialog not appearing - by Oh - 25.11.2011, 01:20
Re: Dialog not appearing - by serman - 25.11.2011, 01:29
Re: Dialog not appearing - by Oh - 25.11.2011, 02:35
Re: Dialog not appearing - by =WoR=Varth - 25.11.2011, 03:22
Re: Dialog not appearing - by Oh - 25.11.2011, 05:30
Re: Dialog not appearing - by CSSI - 25.11.2011, 06:38
Re: Dialog not appearing - by Mr_Scripter - 25.11.2011, 07:20
Re: Dialog not appearing - by Oh - 26.11.2011, 02:28

Forum Jump:


Users browsing this thread: 2 Guest(s)