Files

> > CS2D > Lua Scripts > Bank
Files overviewCS2D overviewLua Scripts overview

English Bank >

40 comments730 b, 1,562 Downloads

old Bank

Deatherr
User Off Offline

This lua allows you to have a bank in your server!
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 Download

730 b, 1,562 Downloads

Comments

40 comments
Page
To the start Previous 1 2 Next To the start

Log in!

You need to log in to be able to write comments!Log in

old

Sparty
Reviewer Off Offline

This could help my News inc.
I like it!

old

Ashley
BANNED Off Offline

deposit or withdraw

deposit (get money from bank)
withdraw (add cash to the bank )
but nice

you made something that every erver have !
I like it!

old

hundesohn
User Off Offline

i dont like this script dont safe the money but good idea

old

Misho
User Off Offline

> When you put 10 it puts 1
> When you put 50 it puts 5
> When you put 100 it puts 10
> When you put 200 it puts 20
And this is not so good.
So i saw what was the bug.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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
I think now it's better.

old Nice one.

Powermonger
User Off Offline

Nice lua, allready using it in my server
Can you make a money save feature? Like, when I save money to bank and disconnect, I can still have that money. It could save money, for any player with U.S.G.N. account.
I know how to make and edit lua scripts, but I am not very good, I need more practice : /
I like it!

old

Marijuana
User Off Offline

Terrible.

old

Sudden Death
User Off Offline

n/c i try to make that in 2 hours and here what i see? i can download it
I like it!
edited 1×, last 16.07.11 06:05:00 pm

old LOL

OlaFPhp
User Off Offline

I AGREE ON RATTLE2X
I like it!

old

Deatherr
User Off Offline

Isn't F2,F3,F4 server actions ?

old

HaRe
User Off Offline

What are you talking about Rattle omg

F2, F3 and F4 are custom keys that u can use

F5 is Screenshoot
F6, F7 arent anything

old

connor34
User Off Offline

Every body shut up i will rate 4/5 its not your problem okay?
I like it!

old

archmage
User Off Offline

@Lightning:
Sometimes simpler things are greater than complex things.
So what it is still a good script. He did not upload it to show how hard it was to write, but so people could enjoy it. People unlike you that are jealous and have probably never written in any programming/scripting language. You do not have any uploads so unlike this "easy" script it is probably too hard for you.

Let me tell you something that you obviously do not know. Rate on how well you liked it. Otherwise stfu and don't rate.
Since you are so good write this script in a completely different way (maybe in a different language) and add every thing the post 4 below mine wants. Then upload.
I like it!

old

awcmon
User Off Offline

Good but i want SAVE and to put MORE cash!
I like it!

old

Marijuana
User Off Offline

It's good. I've been looking for one of these. Lacks the ability to save the amount of money you have. 3 / 5

old

GunShoot
COMMUNITY BANNED Off Offline

wait can u make autosave
I like it!
To the start Previous 1 2 Next To the start