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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
--------------------------------------------------
-- 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 = {}
-----------------------
-- INITIAL SETUP --
-----------------------
function initArray(m)
	local array = {}
	for i = 1, m do
		array[i] = 0
	end
	return array
end
sample.classes.class = initArray(32)
function sample.classes.classmenu(id)
	menu(id,"Choose your training,Professional,Rusher,Marksman,Crowd Control,Navy Seal,ATV Gunner,Team Alpha,Team Delta,Next")
end
function sample.classes.classmenu2(id)
	menu(id,"Choose your training2,Team Major,Commando,Governator,Back")
end
-----------------------
-- TEAM -> CLASS --
-----------------------
addhook("team","sample.classes.team")
function sample.classes.team(id,team)
	if (team>0) then
		sample.classes.classmenu(id)
	end
end
-----------------------
-- SERVERACTION --
-----------------------
addhook("serveraction","sample.classes.serveraction")
function sample.classes.serveraction(id)
	sample.classes.classmenu(id)
end
-----------------------
-- CLASS SELECTION --
-----------------------
addhook("menu","sample.classes.menu")
function sample.classes.menu(id,menu,sel)
	if (menu=="Choose your training") then
		if (sel>=0 and sel<=8) then
			sample.classes.class[id] = sel
			if (player(id,"health")>0) then
				parse("killplayer "..id)
			end
		elseif (sel==9) then
			sample.classes.classmenu2(id)
		end
	elseif (menu=="Choose your training 2") then
		if (sel>=0 and sel<=3) then
			sample.classes.class[id] = sel + 10
			if (player(id,"health")>0) then
				parse("killplayer "..id)
			end
		elseif sel == 4 then
			sample.classes.classmenu(id)
		end
	end
end
-----------------------
-- SPAWN --
-----------------------
addhook("spawn","sample.classes.spawn")
function sample.classes.spawn(id)
	if sample.classes.class[id] == 0 then
		sample.classes.class[id] = math.random(1,12)
	end
	-- Professional
	if (sample.classes.class[id]==1) then
		parse ("setmaxhealth "..id.." 100")
		parse ("setarmor "..id.." 100")
		parse ("speedmod "..id.." 5")
		return "33,5,52,59";
	-- Rusher
	elseif (sample.classes.class[id]==2) then
		parse ("setmaxhealth "..id.." 120")
		parse ("setarmor "..id.." 150")
		parse ("speedmod "..id.." 10")
		return "22,6,51";
	-- Marksman
	elseif (sample.classes.class[id]==3) then
		parse ("setmaxhealth "..id.." 90")
		parse ("setarmor "..id.." 100")
		parse ("speedmod "..id.." 5")
		return "34,3,53,79";
	-- Crowd Control
	elseif (sample.classes.class[id]==4) then
		parse ("setmaxhealth "..id.." 80")
		parse ("setarmor "..id.." 50")
		return "41,4,69,54";
	-- Navy Seal
	elseif (sample.classes.class[id]==5) then
		parse ("setmaxhealth "..id.." 100")
		parse ("setarmor "..id.." 150")
		parse ("speedmod "..id.." 5")
		return "20,31,1,53";
	-- ATV Gunner
	elseif (sample.classes.class[id]==6) then
		parse ("setmaxhealth "..id.." 120")
		parse ("setarmor "..id.." 100")
		return "30,2,51,79";
	-- Team Alpha
	elseif (sample.classes.class[id]==7) then
		parse ("setmaxhealth "..id.." 120")
		parse ("setarmor "..id.." 150")
		parse ("speedmod "..id.." -5")
		return "40,2,51";
	-- Team Delta
	elseif (sample.classes.class[id]==8) then
		parse ("setmaxhealth "..id.." 80")
		parse ("setarmor "..id.." 50")
		parse ("speedmod "..id.." 10")
		return "32,3,51,52,84";
	-- Team Major
	elseif (sample.classes.class[id]==10) then
		parse ("setmaxhealth "..id.." 120")
		parse ("setarmor "..id.." 100")
		parse ("speedmod "..id.." -5")
		return "11,5,76,77";
	-- Commando
	elseif (sample.classes.class[id]==11) then
		parse ("setmaxhealth "..id.." 120")
		parse ("setarmor "..id.." 100")
		parse ("speedmod "..id.." -5")
		return "11,5,76,77";
	-- Governator
	elseif (sample.classes.class[id]==12) then
		parse ("setmaxhealth "..id.." 120")
		parse ("setarmor "..id.." 100")
		parse ("speedmod "..id.." -5")
		return "11,5,76,77";
	end
end
-----------------------
-- NO BUYING --
----------------------
addhook("buy","sample.classes.buy")
function sample.classes.buy()
	return 1
end
-----------------------
-- NO COLLECTING --
-----------------------
addhook("walkover","sample.classes.walkover")
function sample.classes.walkover(id,iid,type)
	if (type>=61 and type<=68) then
		return 0
	end
	return 1
end
-----------------------
-- NO DROPPING --
-----------------------
addhook("drop","sample.classes.drop")
function sample.classes.drop()
	return 1
end
-----------------------
-- NO DEAD DROPPING --
-----------------------
addhook("die","sample.classes.die")
function sample.classes.die()
	return 1
end