01.01.2015, 18:49
Hello, I am working on a bank system, But I am stuck on the withdraw part, I've got the code, but it doesn't seem to work properly, I've read up online about how to make bank systems and most of them didn't suit my needs, but I used a bit of code from theirs to help me out with bits such as if player types letters not numbers, When I click on withdraw, it brings me to a dialog with an input box, I type the money in, nothing happens, it doesn't send a message saying I've not go enough or that my it has gone in/out.
My code:
If you're able to help that would be great! thank you!
My code:
pawn Код:
if(response)
{
switch(dialogid == DIALOG_WITHDRAW)
{
case 1:
{
switch(listitem)
{
case 0:
{
if(!isnumeric(inputtext)) return SendClientMessage(playerid, -1, "Please only type numbers only");
if(strval(inputtext) > pInfo[playerid][BMoney]) return SendClientMessage(playerid, -1, "You do not have enough money in your bank account");
pInfo[playerid][BMoney] = (pInfo[playerid][BMoney] - strval(inputtext));
GivePlayerMoney(playerid, strval(inputtext));
format(ustr, sizeof ustr, "You have token out $%i", strval(inputtext));
SendClientMessage(playerid, -1, ustr);
}