Dialog does not respond correct.
#1

I want it to withdraw the amount I type in the dialog.
But it says $0 was withdrawn from your account.

pawn Код:
if(response)
    {
        if(dialogid == BANKMENU)
        {
    new tmp[256];
  new cashdeposit = strval(tmp);
          ConsumingMoney[playerid] = 1;
          GivePlayerMoney(playerid,cashdeposit);
          PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
          format(string, sizeof(string), " ** You Have Withdrawn $%d from your account Total: $%d ", cashdeposit,PlayerInfo[playerid][pAccount]);
          SendClientMessage(playerid, COLOR_GREEN, string);
          return 1;
        }
    }
Reply
#2

So you enter the amount you want to withdraw to input dialog?

So now you have:
new cashdeposit = strval(inputtext);

I think that is your problem
Reply
#3

Yah as Johnson said, you are trying to get something from tmp which is nothing.
You want to use
pawn Код:
new cashdeposit = strval(inputtext);
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)