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
-- Classes Script --
function initArray(m)
	local array = {}
	for i = 1, m do
		array[i]=0
	end
	return array
end
class = initArray(32)
addhook("say","FUNCsay")
function FUNCsay(id,txt)
	if txt == "Soldier"
		if player(id,"health") > 0 then
			class[id] = 1
			parse("killplayer "..id.."")
			msg2(id,"You became a Soldier")
		else
			msg2(id,"You can't change classes while you're dead")
		end
	end
	if txt == "Bomberman"
		if player(id,"health") > 0 then
			class[id] = 2
			parse("killplayer "..id.."")
			msg2(id,"You became a Bomberman")
		else
			msg2(id,"You can't change classes while you're dead")
		end
	end
end
addhook("spawn","FUNCspawn")
function FUNCspawn(id)
	if class[id] == 1 then
		parse ("setmaxhealth "..id.." 150")
		parse ("speedmod "..id.." -5")
		parse ("equip "..id.." 40")
	end
	if class[id] == 2 then
		parse ("setmaxhealth "..id.." 120")
		parse ("speedmod "..id.." 5")
		parse ("equip "..id.." 77")
	end
end
Untested.