Forum
CS2D Scripts buy exp scriptbuy exp script
4 Antworten 1
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
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
function initArray(m) 	local array = {} 	for i = 1, m do 		array[i]=0 	end 	return array end exps = initArray(32) addhook("say","say") function say(id,text) if text == "!rune" then 	menu(id,"Rune,Buy EXP|10000$") 	return 1 	end end addhook("menu","menu") function menu(id,title,button) if title == "Rune" then 	if button == 1 then 		if (player(id,"money")>=10000) then 			parse("setmoney "..id.." "..player(id, "money") - 10000) 			exps[id]=exps[id]+math.random(1,99999) 			end 		end 	end end
Like this ? , Untest and unoptimize
Edit 1 : Sorry , i didn't notice that checker
1× editiert, zuletzt 17.08.12 19:26:00
1
if (player(id,"money")>=10000) then
Add this after the "if button == 1 then"
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
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
function Array(m) local array = {} for i = 1, m do array[i]=0 end return array end exp = Array(32,0) addhook("serveraction","a") function a(id,action) 	if action==1 then 		menu(id,"Buy Exp,5 XP|1K,205 EXP|5K") 	end end addhook("menu","b") function b(id,title,button) if title=="Buy Exp" then if button==1 and player(id,"money")==1000 then parse('setmoney '..id..' '..player(id,'money')-1000) exp[id]=exp[id]+5 elseif button==2 and player(id,"money")==5000 then parse('setmoney '..id..' '..player(id,'money')-5000) exp[id]=exp[id]+205 end end end
@ berserk:
1