SORRY FOR MY BAD ENGLISH :@
Here we have the table
you can edit it and add more commands
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
funcandvar = { [1] = function(id) 	parse("speedmod "..id.." 100") end, [2] = function(id) 	... end, [3] = function(id) 	... end, }
here the messages for some command:
1
funcandmsg = {"speedmoded","...","..."}
you can add more.
to execute with this
1
2
2
funcandvar[...](id) -- execute the commands funcandmsg[...] -- messages
you can execute this in any hook
so i made a simple hook with math.random in some function
then:
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
addhook("say","tableuse") function tableuse(id,txt) 	if (txt=="table") then 		local exec=math.random(1,#funcs) 		funcs[exec](id) 		msg(funcandmsg[exec]) 	end end
so the code would remain
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
funcandvar = { [1] = function(id) 	parse("speedmod "..id.." 100") end, [2] = function(id) 	... end, [3] = function(id) 	... end, } funcandmsg = {"speedmoded","...","..."} addhook("say","tableuse") function tableuse(id,txt) 	if (txt=="table") then 		local exec=math.random(1,#funcs) 		funcs[exec](id) 		msg(funcandmsg[exec]) 	end end