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
---------------------------------
if sample==nil then sample={} end
sample.classes={}
---------------------------------
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,"IQ Menü,Nichts|0 Fähigkeit,Dummkopf|Langsam 3000$,Helle-Birne|Normal 9000$,Einstein|Mr.Perfekt 12000$")	
end
---------------------------------
addhook("serveraction","sample.classes.serveraction")
function sample.classes.serveraction(id)
	sample.classes.classmenu(id)
end
---------------------------------
addhook("menu","sample.classes.menu")
function sample.classes.menu(id,menu,sel)
	if (menu=="IQ Menü") then
		if (sel>=1 and sel<=6) then
			sample.classes.class[id]=sel
			if (player(id,"health")>0) then
				parse("killplayer "..id)
			end
		end
	end
end
--------------------------------
addhook("spawn","sample.classes.spawn")
function sample.classes.spawn(id)
	--Nichts
	if (sample.classes.class[id]<=1) then
		parse ("setmaxhealth "..id.." 50")
	end	
	-- Dummkopf
	if (sample.classes.class[id]<=2) then
		parse ("setmaxhealth "..id.." 250")
		parse ("speedmod "..id.." -7")
		parse ("setmoney "..id.." "..player(id,"money")>=-3000)
		parse ("equip "..id.." 82")
	end
	-- Helle-Birne
	if (sample.classes.class[id]<=3) then
		parse ("setmaxhealth "..id.." 125")
		parse ("speedmod "..id.." 3")
		parse ("setmoney "..id.." "..player(id,"money")>=-9000)
	end
	-- Einstein
	if (sample.classes.class[id]<=4) then
		parse ("setmaxhealth "..id.." 62")
		parse ("speedmod "..id.." 8")
		parse ("setmoney "..id.." "..player(id,"money")>=-12000)
	end
end
--------------------------------
addhook("buy","sample.classes.buy")
function sample.classes.buy()
	return 1
end