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
learn = {
tags = {"a","b","c"}, -- max 9 entries
hooks = {"menu","serveraction","say","join"},
tag = {}
}
for k,v in pairs (learn.hooks) do
	addhook(v,"learn_"..v)
end
function learn_join(id)
	learn.tag[id] = nil
end
function learn_menu(id,t,b)
	if t == "Tags" then
		learn.tag[id] = b
	end
end
function learn_serveraction(id,b)
	if b==1 then
		local menuString = "Tags"
		for k,v in pairs (learn.tags) do
			if learn.tag[id] == k then
				menuString = menuString .. "," .. "(" .. tags[k] .. ")"
			else
				menuString = menuString .. "," .. tags[k]
			end
		end
		menu(menuString)
		menuString = nil
	end
end
function learn_say(id,txt)
	if learn.tag[id] then
		msg(player(id,"name").."["..learn.tags[learn.tag[id]].."]: "..txt)
	end
end