Increase the maximum amount of cash you can have, or make it so they cannon deposit all if it goes over the maximum limit.
|
|
alright so. lets say i have 1000M cash in bank and 2147M in money pouch, and i use the deposit all button, it deposits all the cash but it make the cash disappear if you want a video of it, or want to go on tv just tell me and ill pm you
heres the code
Code:case 82032: //deposit money pouch if (c.MoneyCash > 0) { c.getItems().addItemToBank(995, c.MoneyCash); c.MoneyCash = 0; c.getPA().sendFrame126(""+c.MoneyCash+"", 8134); c.getPA().sendFrame126(""+c.MoneyCash+"", 8135); c.sendMessage("You bank all your coins from your money pouch!"); } else if (c.MoneyCash == 0) { c.sendMessage("Your money pouch contains no coins."); } break;
Increase the maximum amount of cash you can have, or make it so they cannon deposit all if it goes over the maximum limit.
I don't know what your code means. Just make it check that you're not adding anything over Integer.MAX_VALUE, and if you are, then it will not allow you to.
I know that. Make it not...
Code:int bankAmount = ...; int moneyPouch = ...; if((long)(bankAmount + moneyPouch) > Integer.MAX_VALUE) depositMoneyPouch(Integer.MAX_VALUE-bankAmount); else depositMoneyPouch(moneyPouch);Code:public void depositMoneyPouch(int amount) { c.getItems().bankItem(995, amount); }
That should give you an idea.
| « Non-Renmed to-Renamed. program? | Is this possible to make » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |