Dialog won't work
#6

Your indentation is completly wrong.
Like MotherDucker said, define your dialogid before use it.
PHP код:
#define FIRSTMENU    990
#define SECONDMENU  991
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == FIRSTMENU)
    {
        if(
reponse)
        {
            if(
listitem == 0)
            {
                
ShowPlayerDialog(playeridSECONDMENUDIALOG_STYLE_LIST,
                
"Regular Players Lounge",
                
"MP5\nCombat Shotgun\nDesert Eagle\nM4\nAK-47\nBack",
                
"Select""Exit");
            }
        }
    }
    
    if(
dialogid == SECONDMENU)
    {
        if(
reponse)
        {
            switch(
listitem)
              {
                case 
0:
                {
                    new 
ammo GetPlayerAmmo(playerid);
                    if(
ammo >= 600) return SendClientMessage(playeridCOLOR_GREY"Sorry you have all the free ammo we can give you for now");
                    if(
GetPlayerMoney(playerid) < 15000) return SendClientMessage(playeridCOLOR_GREY,"* You cannot afford this!");
                    
GivePlayerMoney(playerid, -15000);
                    
GivePlayerWeapon(playerid29200);
                    return 
1;
                }
                case 
1:
                {
                    new 
ammo GetPlayerAmmo(playerid);
                    if(
ammo 400) return SendClientMessage(playeridCOLOR_GREY"Sorry you have all the free ammo we can give you for now");
                    if(
GetPlayerMoney(playerid) < 8000) return SendClientMessage(playeridCOLOR_GREY,"* You cannot afford this!");
                    
GivePlayerWeapon(playerid,25 ,25);
                    
GivePlayerMoney(playerid, -8000);
                    return 
1;
                }
                default : return 
1;
            }
               return 
1;
        }
    }
     return 
1;

pastbin with right indentation: http://pastebin.com/n6vPZuHC
Reply


Messages In This Thread
Dialog won't work - by Krauser123 - 23.06.2016, 00:44
Re: Dialog won't work - by Dayrion - 23.06.2016, 03:43
Re: Dialog won't work - by Krauser123 - 23.06.2016, 03:58
Re: Dialog won't work - by MotherDucker - 23.06.2016, 04:00
Re: Dialog won't work - by Krauser123 - 23.06.2016, 04:05
Re: Dialog won't work - by Dayrion - 23.06.2016, 04:14
Re: Dialog won't work - by Krauser123 - 23.06.2016, 04:35
Re: Dialog won't work - by Dayrion - 23.06.2016, 04:41
Re: Dialog won't work - by Krauser123 - 23.06.2016, 17:34

Forum Jump:


Users browsing this thread: 1 Guest(s)