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
members = {48086,xxxx,xx} -- put usgns separated by comma
function totable(t,match)
local cmd = {}
if not match then match = "[^%s]+" end
for word in string.gmatch(t, match) do
table.insert(cmd, word)
end
return cmd
end
mute = {}
addhook("say","commands")
function commands(id,txt)
local p = totable(txt)
local cmd = tostring(p[1])
local pl = tonumber(p[2])
for mbr = 1,#members do
if player(id,"usgn")==members[mbr] then
if cmd == "!kick" then
parse("kick "..pl)
return 1
elseif cmd == "!ban" then
parse("banusgn "..pl)
return 1
elseif cmd == "!ipban" then
parse("banip "..player(pl,"ip"))
return 1
elseif cmd == "!slap" then
parse("slap "..pl)
return 1
elseif cmd=="!mute" then
if mute[pl]==true then
mute[pl]=false
msg2(id,player(pl,"name").." was unmuted!")
						msg2(pl,"You were unmuted!")
						return 1
					else
						mute[pl]=true
						msg2(id,"You muted "..player(pl,"name"))
						msg2(pl,"You were muted!")
						return 1
						end
			elseif cmd == "!consorname" then
				 local name = (p[3])
				 parse("setname "..pl.." "..name)
			return 1
			elseif cmd == "!spec" then
				 parse("makespec "..pl)
			return 1
			end
			if not string.match(txt,(string.char(33))) then
			msg("©255255255"..player(id,"name").." [Member]: "..txt)
			return 1
			end
			if mute[id]==true then
			return 1
			end
		end
	end
end
It works