Press [F2],[F3],or [F4] to open up the bank.
You can put in : $100,$500,$1000,$5000
This lua is useful for Town maps.
Approved by Seekay
Download
730 b, 1,541 Downloads
addhook("join","bank_join") addhook("menu","bank_menu") addhook("serveraction","bank_serveraction") function array(m) local array = {} for i = 1, m do array[i] = 0 end return array end bank_money_player = array(32) bank_table = {100,500,1000,2000} function bank_join(p) bank_money_player[p] = 0 end function bank_serveraction(p) menu(p,"Bank Menu (Your Cash: "..bank_money_player[p].."),Add Cash To Bank,Take Cash From Bank") end function bank_cash_add(p) menu(p,"Add Cash To Bank? (Bank: "..bank_money_player[p].."),$100,$500,$1000,$5000") end function bank_cash_take(p) menu(p,"Take Cash From Bank? (Bank: "..bank_money_player[p].."),$100,$500,$1000,$5000") end function bank_menu(p,t,s) if ("Bank Menu" == string.sub(t, 1, 9)) then if (s == 1) then bank_cash_add(p) elseif (s == 2) then bank_cash_take(p) end end if ("Add" == string.sub(t, 1, 3)) then if (bank_table[s] < player(p,"money")) then bank_money_player[p] = bank_money_player[p] + bank_table[s] parse('setmoney '..p..' '..player(p,"money") - bank_table[s]) msg2(p,'©000255000You Added '..bank_table[s]..'$ To Bank!@C') bank_cash_add(p) else msg2(p,'©255000000You Added '..player(p,"money")..'$ To Bank!@C') msg2(p,'©255000000You Dont Have More Money To Add!@C') bank_money_player[p] = bank_money_player[p] + player(p,"money") parse('setmoney '..p..' 0') end end if ("Take" == string.sub(t, 1, 4)) then if (bank_money_player[p] > 0) then if (player(p,"money") + bank_table[s] < 16000) then bank_money_player[p] = bank_money_player[p] - bank_table[s] parse('setmoney '..p..' '..player(p,"money") + bank_table[s]) msg2(p,'©000255000You Took '..bank_table[s]..'$ From Bank!@C') bank_cash_take(p) else msg2(p,'©255000000You Cant Have More Than 16000$ In Hand!@C') end else msg2(p,'©255000000Your Bank Is Empty!@C') end end end