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
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
function command_entry(id,txt) 	p = {} 	for word in string.gmatch(txt, "%S+") do 		table.insert(p,word) 	end 	 		if p[1] == "@kill" then kill(id,p[2]) 	elseif p[1] == "@kick" then kick(id,p[2]) 	elseif p[1] == "@spawn" then spawn(id,p[2]) 	elseif p[1] == "@setcolor" then setcolor(id,p[2]) 	elseif p[1] == "@setcustomlvl" then customlevel(id,p[2]) 	elseif p[1] == "@equip" then equip(id,p[2],p[3]) 	elseif p[1] == "@help" then	help(id) 	elseif p[1] == "@fake" then fake(id,p[2]) 	elseif p[1] == "@faketo" then faketo(id,p[2],p[3]) 	elseif p[1] == "@speedmod" then speedmod(id,p[2],p[3]) 	elseif p[1] == "@listusers" then listusers(id) 	elseif p[1] == "@check" then check(id,p[2]) 	elseif p[1] == "@adduser" then adduser(id,p[2],p[3]) 	elseif p[1] == "@makespecall" or p[1] == "@specall" then makespecall(id) 	elseif p[1] == "@makespec" or p[1] == "@spec" then makespec(id,p[2]) 	elseif p[1] == "@maket" or p[1] == "@tr" then maket(id,p[2]) 	elseif p[1] == "@makect" or p[1] == "@ct" then makect(id,p[2]) 	elseif p[1] == "@restart" or p[1] == "@rr" then restart(id) 	else msg("©"..colorlist[id].."["..customlvl[id].."] "..player(id,"name")..": "..txt)	 	end end
I want to load every function according to the first parameter. But I guess this form is inappropiate to handle all things. Just wanna know if there is a better way to do this.
Thanks.