Dialog bug
#1

PHP код:
    if(dialogid == DIALOG_BANK)
    {
        if(
response)
        {
            switch(
listitem)
            {
            case 
0:
            {
                if(
dini_Int(file"HasBankAccount") == 0)
                {
                    
ShowPlayerDialog(playeridDIALOG_BANK_ACCOUNTCREATEDIALOG_STYLE_MSGBOX"{FFFFFF}Confirmation""{FFFFFF}Are you sure you want to create an account?\nCreating an account costs $5000.""Confirm""Cancel");
                }
                else
                {
                    
SendClientMessage(playerid, -1"You already have an account!");
                }
            }
            case 
1:
            {
                
            }
        }
            return 
1;
    }
        if(
dialogid == DIALOG_BANK_ACCOUNTCREATE)
    {
        if(
response)
        {
              
GivePlayerMoney(playerid, -5000);
              
dini_IntSet(file"HasBankAccount"1);
              
SendClientMessage(playeridCOLOR_GREEN"Congratulations, you've created a bank account!");
        }
        return 
1;
    }
        
}
    return 
1;

Basically everything works except that if you click on "confirm" in the second dialog it won't send you that message or do anything that in that block (check DIALOG_BANK_ACCOUNTCREATE.
Can you please post a fix and tell me what I did wrong?
Reply


Messages In This Thread
Dialog bug - by TroubleFingers - 08.11.2016, 14:20
Re: Dialog bug - by Miladinovic - 08.11.2016, 14:34
Re: Dialog bug - by TroubleFingers - 08.11.2016, 14:35
Re: Dialog bug - by Miladinovic - 08.11.2016, 14:42
Re: Dialog bug - by Miladinovic - 08.11.2016, 14:44
Re: Dialog bug - by TroubleFingers - 08.11.2016, 14:49
Re: Dialog bug - by Miladinovic - 08.11.2016, 14:53
Re: Dialog bug - by Miladinovic - 08.11.2016, 14:56
Re: Dialog bug - by TroubleFingers - 08.11.2016, 15:00
Re: Dialog bug - by Miladinovic - 08.11.2016, 15:02

Forum Jump:


Users browsing this thread: 4 Guest(s)