Need help with dialogs not showing up.
#3

try this form

pawn Код:
if(dialogid == DIALOG_BANK)
    {
        if(response)
        {
           
            switch(listitem)
            {
                case 0:
                {
                    new string[128];
                    format(string, sizeof(string), "{3BB9FF}You have {008000}$%i {3BB9FF}in your bank.", PlayerInfo[playerid][pBank]);
                    strcat(string, "\nHow much would you like to withdraw?");
                    ShowPlayerDialog(playerid, DIALOG_WITHDRAW, DIALOG_STYLE_INPUT, "Withdrawal", string, "Confirm", "Cancel");
                }
                case 1:
                {
                    ShowPlayerDialog(playerid, DIALOG_DEPOSIT, DIALOG_STYLE_INPUT, "Deposit", "How much would you like to deposit?", "Confirm", "Cancel");
                }
                case 2:
                {
                    SendClientMessage(playerid, COLOR_GREY, "This feature is currently being developed.");
                }
            }
        }
    }
   
    if(dialogid == DIALOG_WITHDRAW)
    {
        if(response)
        {
            if(!IsNumeric(inputtext))
            {
                new cash;
                cash = strval(inputtext);
                if(cash <= PlayerInfo[playerid][pBank])
                {
                    PlayerInfo[playerid][pBank] = PlayerInfo[playerid][pBank] - cash;
                    GivePlayerCash(playerid, cash);
                }
                else SendClientMessage(playerid, COLOR_GREY, "You don't have enough money in your bank account.");
            }
            else SendClientMessage(playerid, COLOR_GREY, "The amount entered is not numeric!");
        }
    }

    if(dialogid == DIALOG_DEPOSIT)
    {
        if(response)
        {
            if(!IsNumeric(inputtext))
            {
                new cash;
                cash = strval(inputtext);
                if(cash <= PlayerInfo[playerid][pCash])
                {
                    GivePlayerCash(playerid, -cash);
                    PlayerInfo[playerid][pBank] = PlayerInfo[playerid][pBank] + cash;
                }
                else SendClientMessage(playerid, COLOR_GREY, "You don't have that much money on you.");
            }
            else SendClientMessage(playerid, COLOR_GREY, "The amount entered is not numeric!");
        }
    }
Reply


Messages In This Thread
Need help with dialogs not showing up. - by Prostilov - 22.07.2013, 14:55
Re: Need help with dialogs not showing up. - by Prostilov - 22.07.2013, 21:27
Re: Need help with dialogs not showing up. - by PT - 23.07.2013, 01:28
Re: Need help with dialogs not showing up. - by Aerotactics - 23.07.2013, 05:23
Re: Need help with dialogs not showing up. - by ThePhenix - 23.07.2013, 05:25
Re: Need help with dialogs not showing up. - by Prostilov - 23.07.2013, 13:58
Re: Need help with dialogs not showing up. - by Prostilov - 23.07.2013, 14:01

Forum Jump:


Users browsing this thread: 1 Guest(s)