OnDialogResponse Problem
#5

I have:
pawn Код:
//-----------------------------------ATM--------------------------------------------------------
    if(strcmp(cmd, "/bwithdraw", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerToPoint(3, playerid,658.9031,-496.3253,16.3359) || PlayerToPoint(3, playerid,564.2574,-1292.9720,17.2482) || PlayerToPoint(3, playerid,301.0207,-203.2226,1.5781))
            {
                new BancomatString[1024];
                strins(BancomatString,"{00CC00}Extragere cont:",strlen(BancomatString));
                ShowPlayerDialog(playerid,382,DIALOG_STYLE_INPUT,BancomatString,"Tastati mai jos suma pe care doriti sa o extrageti.\nComision: 5%","Extrage","Renunta");
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "   Nu esti langa un Bancomat !");
                return 1;
            }
        }
        return 1;
    }
And:
pawn Код:
public OnDialogResponseOthers(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 382)// bancomat extrage
    {
        if(response == 1)
        {
            if(!strlen(inputtext))
            {
                SendClientMessage(playerid,COLOR_GREY," Nu ati tastat suma !");
                return 1;
            }
            new cashdeposit = strval(inputtext);
            if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1)
            {
                SendClientMessage(playerid, COLOR_GRAD2, "   Nu aveti asa mult !");
                return 1;
            }
            //ConsumingMoney[playerid] = 1;
            new proc = (cashdeposit*5)/100;
            new bani = cashdeposit-proc;
            new string[500];
            SafeGivePlayerMoney(playerid,bani);
            PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-bani-proc;
            format(string, sizeof(string), "  Ati scos suma de %d RON din contul dumneavoastra. Total Cont: %d RON. Va multumim pentru ca ati folosit bancomatul!", bani,PlayerInfo[playerid][pAccount]);
            SendClientMessage(playerid, COLOR_YELLOW, string);
            BizzInfo[3][bTill] += proc;
            BizzInfo[4][bTill] += proc;
            BizzInfo[18][bTill] += proc;
        }
        else
        {
            SendClientMessage(playerid, COLOR_WHITE, "Va multumim pentru ca ati folosit bancomatul!");
        }
    }
    return 1;
}
When i use the command,all is normal,but when i hit EXTRACT, the dialog close instead of withdraw.
Reply


Messages In This Thread
OnDialogResponse Problem - by calin1996 - 28.05.2012, 17:34
Re: OnDialogResponse Problem - by CidadeNovaRP - 28.05.2012, 17:37
Re: OnDialogResponse Problem - by calin1996 - 28.05.2012, 17:45
Re: OnDialogResponse Problem - by CidadeNovaRP - 28.05.2012, 17:58
Re: OnDialogResponse Problem - by calin1996 - 28.05.2012, 18:18
Re: OnDialogResponse Problem - by calin1996 - 28.05.2012, 18:43
Re: OnDialogResponse Problem - by HuSs3n - 28.05.2012, 19:06
Re: OnDialogResponse Problem - by Legolas.W - 28.05.2012, 19:56
Re: OnDialogResponse Problem - by calin1996 - 29.05.2012, 10:55
Re: OnDialogResponse Problem - by calin1996 - 29.05.2012, 11:01

Forum Jump:


Users browsing this thread: 1 Guest(s)