Forum

> > CS2D > Scripts > Buy menu only for ct.
Forums overviewCS2D overview Scripts overviewLog in to reply

English Buy menu only for ct.

2 replies
To the start Previous 1 Next To the start

old Buy menu only for ct.

Remulux
User Off Offline

Quote
How to make this buy menu only for ct?
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
function initArray(m,v)
	local array = {}
	for i = 1, m do
		array[i]=0
	end
	return array
end

addhook("serveraction","dserv")
function dserv(id,a)
	if a==1 then
		menu(id,"Weapons,Mine     $3000,Laser Mine     $5000,HE Grenade     $500,Gas Granade     $2000,Molotov     2000,FN     $10000,Flamethrower     $10000")
	end
end

addhook("menu","dmenu")
function dmenu(id,t,b)
	local mon=player(id,"money")
	if (t=="Weapons") then
		if b==1 and mon>3000 then
			parse("equip "..id.." 77")
			parse("setmoney "..id.." "..(mon-3000))
		end
		
		if b==2 and mon>5000 then
			parse("equip "..id.." 87")
			parse("setmoney "..id.." "..(mon-5000))
		end
		
		if b==3 and mon>500 then
			parse("equip "..id.." 51")
			parse("setmoney "..id.." "..(mon-500))
		end
		
		if b==4 and mon>2000 then
			parse("equip "..id.." 72")
			parse("setmoney "..id.." "..(mon-2000))
		end
		
		if b==5 and mon>2000 then
			parse("equip "..id.." 73")
			parse("setmoney "..id.." "..(mon-2000))
		end
		
		if b==6 and mon>10000 then
			parse("equip "..id.." 91")
			parse("setmoney "..id.." "..(mon-10000))
		end
		
		if b==7 and mon>10000 then
			parse("equip "..id.." 46")
			parse("setmoney "..id.." "..(mon-10000))
		end				
	end		
end
Don't copy please.

old Code

Paulo49
User Off Offline

Quote
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
function initArray(m,v)
     local array = {}
     for i = 1, m do
          array[i]=0
     end
     return array
end

addhook("serveraction","dserv")
function dserv(id,a)
if player(id,"team") == 2 then
     if a==1 then
          menu(id,"Weapons,Mine     $3000,Laser Mine     $5000,HE Grenade     $500,Gas Granade     $2000,Molotov     2000,FN     $10000,Flamethrower     $10000")
     end
end
end

addhook("menu","dmenu")
function dmenu(id,t,b)
     local mon=player(id,"money")
     if (t=="Weapons") then
          if b==1 and mon>3000 then
               parse("equip "..id.." 77")
               parse("setmoney "..id.." "..(mon-3000))
          end
          
          if b==2 and mon>5000 then
               parse("equip "..id.." 87")
               parse("setmoney "..id.." "..(mon-5000))
          end
          
          if b==3 and mon>500 then
               parse("equip "..id.." 51")
               parse("setmoney "..id.." "..(mon-500))
          end
          
          if b==4 and mon>2000 then
               parse("equip "..id.." 72")
               parse("setmoney "..id.." "..(mon-2000))
          end
          
          if b==5 and mon>2000 then
               parse("equip "..id.." 73")
               parse("setmoney "..id.." "..(mon-2000))
          end
          
          if b==6 and mon>10000 then
               parse("equip "..id.." 91")
               parse("setmoney "..id.." "..(mon-10000))
          end
          
          if b==7 and mon>10000 then
               parse("equip "..id.." 46")
               parse("setmoney "..id.." "..(mon-10000))
          end                    
     end          
end
Don't copy please.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview