Forum
CS2D Scripts Lua Scripts/Questions/Help Deatherr has written
MiroslavR is working on stuff like that, and no 16000 is the limit of the $ currency, with LUA you can create your own currency. How do you make a bank lua?So you can deposit and withdraw money? ( also to have more than 16000)
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
function array(m) 	local array = {} 	for i = 1, m do 		array[i] = 0 	end 	return array end money = array(32) -- you can also set a maxplayers value and use that value instead of 32 bank_money = array(32)
and the bank... it should be a menu with deposit and withdraw options, you choose the values.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
function initArray(m) local array = {} for i = 1, m do array[i] = 0 end return array end money = initArray(32) addhook("kill","max_mn") function max_mn(id,victim,x,y,wpn) 	money[id] = money[id]+300 end
this part is for kill. next need buy menu with f2, or doesn't work the buy menu.
-WiLSoN- has written
you have to do an array for that like:
you'll also have to do ways of getting money... obviously.
and the bank... it should be a menu with deposit and withdraw options, you choose the values.
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
function array(m) 	local array = {} 	for i = 1, m do 		array[i] = 0 	end 	return array end money = array(32) -- you can also set a maxplayers value and use that value instead of 32 bank_money = array(32)
and the bank... it should be a menu with deposit and withdraw options, you choose the values.
Is that the whole script for the bank? ... i Don't see in the script that you can open the bank menu ...(no offense)
edited 1×, last 11.12.09 03:24:17 am
it just a half script from it.
Deatherr has written
Is that the whole script for the bank? ... i Don't see in the script that you can open the bank menu ...(no offense)
Obviously it isn't the whole script, if you are going to make a map for the script then you can use the "usebutton" or "trigger" hook, to open the bank menu, also you can do it with serveractions and etc,also you have to do ways of winning money, can be by killing,building and etc
Good Luck
can you please help me the script must give you s weapon every round i make the No drop and No buy script but this msg show's when i enter the map on console :
LUA ERROR : attempt to call a nil value
the Script is :
please Help me
But then please notice me in the Credits
edited 1×, last 11.12.09 04:23:15 pm
memo has written
Hi guys i just want to make a Fun Game Mod
can you please help me the script must give you s weapon every round i make the No drop and No buy script but this msg show's when i enter the map on console :
LUA ERROR : attempt to call a nil value
the Script is :
please Help me
can you please help me the script must give you s weapon every round i make the No drop and No buy script but this msg show's when i enter the map on console :
LUA ERROR : attempt to call a nil value
the Script is :
please Help me
try restart CS2D, this problem fixed after I restart CS2D
if work.
@Admirdee
same same nothing happen the msg still go on console every time i play on script
edited 1×, last 11.12.09 04:24:49 pm
1
2
2
addhook("startround","[b]FunGame[/b]") function [b]Fun[/b](id)
i removed the (id) but it didnot work too !
Blazzingxx has written
Hmm, no just restart CS2D (Admirdee, that's hook nil):
Does Startround hook have ID parameter? Answer - No.
1
2
2
addhook("startround","[b]FunGame[/b]") function [b]Fun[/b](id)
lol. I don't see the hook and function x_x
and yes, startround only have mode parameter
@memo
1
2
2
addhook("startround","FunGame") function FunGame()
have you try this?
All his script goes wrong, I will fix and post fixed version.
but the confuse thing that no drop script and no buy script work ?!
thanks Blazzingxx very much its my first script and i am so confuse !
and by the way what the function to add a msg every (time)
same same the one you put on your script like
Gun Game Mod By Blazzingxx
....
can you edit to it to .
In this system you can simple add 10 weapons for each level.
Just edit weapons table:
1
weapons_table[b][round][weapon][/b]
Random Weapon Rounds By Blazzingxx
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
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
addhook("startround","fun_startround") addhook("buy","fun_buy") addhook("drop","fun_drop") weapons_table = {{38,21},{11},{24,5},{30,51},{32,51},{34,35},{87,88},{10,47}} -- [Round][Weapons] speed_table = {0,0,0,0,0,0,0,0,0} -- Table Of Speed For Each Level function fun_startround() 	local i 	local m 	local msg_wpn = "" 	local items = math.random(1,#weapons_table) 	for i = 1,32,1 do		 		for m = 1,#weapons_table[items],1 do 			parse("equip "..i.." "..weapons_table[items][m]) 		end 		if (speed_table[items] == true) then 			parse('speedmod '..i..' '..speed_table[items]) 		end 	end 	for i = 1, #weapons_table[items] do 		if (i > 1) then 			msg_wpn = msg_wpn.." + " 		end 		msg_wpn = msg_wpn..""..itemtype(weapons_table[items][i],"name") 	end 	msg("©000255000"..msg_wpn.." Round!@C") end function fun_buy() 	return 1 end function fun_drop() 	return 1 end
edited 3×, last 11.12.09 05:04:01 pm
You Rock Man !
-WiLSoN- has written
Obviously it isn't the whole script, if you are going to make a map for the script then you can use the "usebutton" or "trigger" hook, to open the bank menu, also you can do it with serveractions and etc,also you have to do ways of winning money, can be by killing,building and etc
Good Luck
Deatherr has written
Is that the whole script for the bank? ... i Don't see in the script that you can open the bank menu ...(no offense)
Obviously it isn't the whole script, if you are going to make a map for the script then you can use the "usebutton" or "trigger" hook, to open the bank menu, also you can do it with serveractions and etc,also you have to do ways of winning money, can be by killing,building and etc
Good Luck
I'm going to mess up the bank lua so bad XD...