Help? Should I script bank system?
Forum
CS2D Scripts Lua Scripts/Questions/HelpHelp? Should I script bank system?
Blazzingxx has written
@Deatherr,
Help? Should I script bank system?
Help? Should I script bank system?
Yeah, you should script everything they tell you to do because they don't even want to try doing it by theirselves.
Flacko has written
Yeah, you should script everything they tell you to do because they don't even want to try doing it by theirselves.
Blazzingxx has written
@Deatherr,
Help? Should I script bank system?
Help? Should I script bank system?
Yeah, you should script everything they tell you to do because they don't even want to try doing it by theirselves.
....I have tried.......I just can't get the bank menu to open . I think that the only problem for the script now.
sry, im newbie with scripts.i think script making would be easier if i have the program what will make them!
Flacko has written
Post what you have tried and we will gladly fix it, then
Thank you!
To open bank menu, press any serveraction.
Here is my bank script for you.
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
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 = {500,1000,2500,5000} 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].."),500$,1000$,2500$,5000$") end function bank_cash_take(p) 	menu(p,"Take Cash From Bank? (Bank: "..bank_money_player[p].."),500$,1000$,2500$,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
iknow this but not work
plz help me to end my script
1
2
3
4
5
2
3
4
5
for id,val in ipairs(player(0,"table")) do 	if(player(val,"health") > 0) then 		parse("equip "..val.." 45") 	end end
edited 2×, last 11.12.09 08:30:31 pm
1
2
3
4
5
2
3
4
5
function givelaser() 	for i,p in ipairs( player(0,"table") ) do 		parse("equip "..p.." 45") 	end end
Good luck.
look at space between 45 and equip
Plz help me
~Console~
LUA ERROR: sys/lua/desk.lua:9: attempt to perform arithmetic on global 'i' (a nil value)
I think you wanted to write 100+id instead.
moreover you are setting id to the image id. you are overwriting the player id. but later (player(id,"team")) you are using id as if it still contains the player id. which is not the case. its not going to work.
you have to use 2 different variable names. mabye "iid" for image id and keep id for the player id.
please read a tutorial about scripting/Lua and try to actually understand your scripts. stupid copy&paste does not work in most cases as you see.
flashlight I did but now there is a problem with me. cannot not understand how to make a turn and off at 1 serveraction
yet I cannot find the reason why it does not work
Please post the function that loads the images.
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
function player_flashlight() 	for i=1,32,1 do 		id=image("gfx/sprites/flashlight.png",1,1,200+i) 		imagecolor(id,255,255,255) 		imageblend(id,1) 		imagealpha(id,0.5) 		imagescale(id,1,1) 	end end player_flashlight()