Dateien

> > CS2D > Lua Scripts > Bank
DateiübersichtCS2D-ÜbersichtLua Scripts-Übersicht

Englisch Bank >

40 Kommentare730 b, 1.482 Downloads

alt 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.
Zugelassen von Seekay

Download Download

730 b, 1.482 Downloads

Kommentare

40 Kommentare
Seite
Zum Anfang Vorherige 1 2 Nächste Zum Anfang

Logge dich ein!

Du musst dich einloggen, um selber Kommentare verfassen zu können!Einloggen

alt

Sparty
Reviewer Off Offline

This could help my News inc.
Ich mag es!

alt

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 !
Ich mag es!

alt

hundesohn
User Off Offline

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

alt

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.

alt 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 : /
Ich mag es!

alt

Sudden Death
User Off Offline

n/c i try to make that in 2 hours and here what i see? i can download it
Ich mag es!
1× editiert, zuletzt 16.07.11 18:05:00

alt LOL

OlaFPhp
User Off Offline

I AGREE ON RATTLE2X
Ich mag es!

alt

Deatherr
User Off Offline

Isn't F2,F3,F4 server actions ?

alt

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

alt

connor34
User Off Offline

Every body shut up i will rate 4/5 its not your problem okay?
Ich mag es!

alt

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.
Ich mag es!

alt

awcmon
User Off Offline

Good but i want SAVE and to put MORE cash!
Ich mag es!

alt

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

alt

GunShoot
COMMUNITY BANNED Off Offline

wait can u make autosave
Ich mag es!
Zum Anfang Vorherige 1 2 Nächste Zum Anfang