Spoiler 

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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
--------------------------------------------------
-- Player Classes Script by Unreal Software --
-- 28.02.2009 - www.UnrealSoftware.de --
-- Adds Player Classes to your server --
--------------------------------------------------
if sample==nil then sample={} end
sample.classes={}
-- initArray
function initArray(m)
	local array = {}
	for i = 1, m do
		array[i]=0
	end
	return array
end
sample.classes.class=initArray(32)
-- Menu
function sample.classes.classmenu(id)
	menu(id,"Select your Class,Zombie1,Zombie2,Zombie3,Zombie4,Zombie5,Zombie6,Zombie7,Zombie8,Zombie9")	
end
-- ServerAction
addhook("serveraction","sample.classes.serveraction")
function sample.classes.serveraction(id,act)
	if (act==1) then
		sample.classes.classmenu(id)
	end
end
addhook("menu","sample.classes.menu")
function sample.classes.menu(id,menu,sel)
	if (menu=="Select your Class") then
		if (sel>=0 and sel<=9) then
			sample.classes.class[id]=sel
		end
	end
end
addhook("spawn","sample.classes.spawn")
function sample.classes.spawn(id,team)
	if (player(id,'bot')) then
		parse ("strip "..id.." 0")
		sample.classes.class[id]=math.random(1,9)
	end
	-- Zombie1
	if (sample.classes.class[id]==1) then
		parse ("setmaxhealth "..id.." 100")
		parse ("setarmor "..id.." 100")
		return "86";
	end
	
	-- Zombie2
	if (sample.classes.class[id]==2) then
		parse ("setmaxhealth "..id.." 100")
		parse ("setarmor "..id.." 206")
		parse ("speedmod "..id.." 10")
		return "86";
	end
	
	-- Zombie3
	if (sample.classes.class[id]==3) then
		parse ("setmaxhealth "..id.." 100")
		parse ("setarmor "..id.." 201")
		return "86";
	end
	
	-- Zombie4
	if (sample.classes.class[id]==4) then
		parse ("setmaxhealth "..id.." 125")
		parse ("setarmor "..id.." 75")
		return "86";
	end
	
	-- Zombie5
	if (sample.classes.class[id]==5) then
		parse ("setmaxhealth "..id.." 75")
		parse ("setarmor "..id.." 0")
		parse ("speedmod "..id.." 30")
		return "86";
	end
	
	-- Zombie6
	if (sample.classes.class[id]==6) then
		parse ("setmaxhealth "..id.." 75")
		parse ("setarmor "..id.." 25")
		return "86";
	end
	
	-- Zombie7
	if (sample.classes.class[id]==7) then
		parse ("setmaxhealth "..id.." 250")
		parse ("setarmor "..id.." 204")
		return "86"; 	
	end
	
	-- Zombie8
	if (sample.classes.class[id]==8) then
		parse ("setmaxhealth "..id.." 250")
		parse ("setarmor "..id.." 203")
		parse ("speedmod "..id.." -10")
		return "86";
	end
	-- Zombie9
	if (sample.classes.class[id]==9) then
		parse ("setmaxhealth "..id.." 200")
		parse ("setarmor "..id.." 100")
		return "86";
	end
end
addhook("say","sample.classes.zombie")
function sample.classes.zombie(id,txt)
if (sample.classes.class[id]==1) then
		if (txt=="!bomb") then
			x = player(id,"tilex")
			y = player(id,"tiley")
			parse("spawnitem 86 "..x.." "..y)
		end
end
end
addhook("projectile","hook")
function hook(id,weapon,x,y)
if (sample.classes.class[id]==1) then
		if (weapon==86) then
		parse("equip "..id.." 86")
		end
end
end
And if ct presses the F2 button he will get a shop menu
Spoiler 

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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
addhook("serveraction","_sa")
function _sa(id,act)
	if act==1 then
		menu(id,"Shop,Pistol,Rifle,SG&SMG");
	end
end
addhook("menu","_menu")
function _menu(id,title,button)
	if (title=="Shop") then
	 	if button==1 then
			menu(id,"Pistol,USP,Glock");
	end
	 	if button==2 then
			menu(id,"Rifle,M4A1,AK-47");
	end
	 	if button==3 then
			menu(id,"SG&SMG,M3,XM1014");
	end
end
	if (title=="Pistol") then
	 	if button==1 then
			local x,y=player(id,"tilex"),player(id,"tiley")
			if (player(id,"money")>=500) then
			parse("spawnitem 1 "..x.." "..y)
			parse("setmoney "..id.." "..player(id,"money")-500);
			msg2(id,"�000255255You bought USP for 500$");
			else
			msg2(id,"�255000000Not enough money!");
		end
	end
	 	if button==2 then
			if (player(id,"money")>=500) then
			local x,y=player(id,"tilex"),player(id,"tiley")
			parse("spawnitem 2 "..x.." "..y)
			parse("setmoney "..id.." "..player(id,"money")-500);
			msg2(id,"�000255255You bought Glock for 500$");
			else
			msg2(id,"�255000000Not enough money!");
			end
		end
	end
	if (title=="Rifle") then
	 	if button==1 then
			if (player(id,"money")>=1000) then
			local x,y=player(id,"tilex"),player(id,"tiley")
			parse("spawnitem 32 "..x.." "..y)
			parse("setmoney "..id.." "..player(id,"money")-1000);
			msg2(id,"�000255255You bought M4A1 for 1000$");
			else
			msg2(id,"�255000000Not enough money!");
		end
	end
	 	if button==2 then
			if (player(id,"money")>=1000) then
			local x,y=player(id,"tilex"),player(id,"tiley")
			parse("spawnitem 30 "..x.." "..y)
			parse("setmoney "..id.." "..player(id,"money")-1000);
			msg2(id,"�000255255You bought AK-47 for 1000$");
			else
			msg2(id,"�255000000Not enough money!");
			end
		end
	end
		if (title=="SG&SMG") then
	 		if button==1 then
			if (player(id,"money")>=800) then
			local x,y=player(id,"tilex"),player(id,"tiley")
			parse("spawnitem 10 "..x.." "..y)
			parse("setmoney "..id.." "..player(id,"money")-800);
			msg2(id,"�000255255You bought M3 for 800$");
			else
			msg2(id,"�255000000Not enough money!");
		end
	end
	 	if button==2 then
			if (player(id,"money")>=900) then
			local x,y=player(id,"tilex"),player(id,"tiley")
			parse("spawnitem 11 "..x.." "..y)
			parse("setmoney "..id.." "..player(id,"money")-900);
			msg2(id,"�000255255You bought XM1014 for 900$");
			else
			msg2(id,"�255000000Not enough money!");
	 		end
		end
	end
end
edited 3×, last 02.11.20 12:36:27 pm
1 button 2 different functions
1 
Offline
Bowlinghead