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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
admin = {139295}
smod = {}
mod = {}
vip = {}
color = { -- You can change this, or add some extra colors. Note: the last color mustn't have "," behind it! "\169" is a copyright icon.
"\169255220000", -- CS2D (yellow) 1
"\169255255255", -- white 2
"\169255000000", -- red 3
"\169000255000", -- green 4
"\169000000255", -- blue 5
"\169220220220", -- light grey 6
"\169064179162", -- PM - light blue 7
"\169255025000", -- T 8
"\169050150255", -- CT 9
"\169100100100" -- pretty dark grey - tag 10
},
-- HOOKS --
addhook("join","_join")
addhook("serveraction","_serveraction")
addhook("say","_say")
addhook("clientdata","_clientdata")
addhook("menu","_menu")
addhook("startround","_startround")
-- FUNCS --
function _join(id) -- No need to change anything here
pl[id] = {}
pl[id].lvl = 1
pl[id].status = "USER"
pl[id].name = player(id,"name")
pl[id].usgn = player(id,"usgn")
pl[id].ip = player(id,"ip")
pl[id].muted = false
for _, usgn in ipairs(admin) do
if player(id,"usgn")==usgn then
pl[id].lvl = 15
pl[id].status = "Admin"
pl[id].tag = "\169255255255[Admin]" --Same tag
pl[id].has_tag = true
end
end
for _, usgn in ipairs(smod) do
if player(id,"usgn")==usgn then
pl[id].lvl = 10
pl[id].status = "Senior Moderator"
pl[id].tag = "\169013185181[\169017223218S\169047236232M\169118243243o\169163248245d\169180247250]"
pl[id].has_tag = true
end
end
for _, usgn in ipairs(mod) do
if player(id,"usgn")==usgn then
pl[id].lvl = 5
pl[id].status = "Moderator"
pl[id].tag = "\169089000179[\169115000230M\169140026255o\169158062255d\169173091255]"
pl[id].has_tag = true
end
end
for _, usgn in ipairs(vip) do
if player(id,"usgn")==usgn then
pl[id].lvl = 3
pl[id].status = "VIP"
pl[id].tag = "\169153251197[VIP]"
pl[id].has_tag = true
end
end
end
function _say(id,txt)
if txt:sub(1,5)=="!kick" then
if pl[id].lvl >= 10 then
t = tonumber(txt:sub(7,8))
local r = txt:sub(9)
parse('kick '..t..' "'..r)
msg(color[2]..""..pl[t].name..""..color[1].." Has Been Kicked by "..color[2]..""..pl[id].name.." (Reason: "..r..")")
return 1
end
if txt:sub(1,5)=="!slap" then
if pl[id].lvl >= 10 then
t = tonumber(txt:sub(7,8))
local r = txt:sub(9)
parse('slap '..t)
msg(color[2]..""..pl[t].name..""..color[1].." Has Been Slapped by "..color[2]..""..pl[id].name.." (Reason: "..r..")")
return 1
end
if txt:sub(1,5)=="!kill" then
if pl[id].lvl >= 5 then
t = tonumber(txt:sub(7,8))
r = txt:sub(9)
parse('killplayer '..t)
msg(color[2]..""..pl[t].name..""..color[1].." Staff Killed by "..color[2]..""..pl[id].name.." (Reason: "..r..")")
return 1
end
if txt:sub(1,6)=="!bring" then
if pl[id].lvl >= 10 then
t = tonumber(txt:sub(8,9))
parse("setpos "..t.." "..player(id,"x").." "..player(id,"y").."")
parse('effect "flare" '..player(id,'x')..' '..player(id,'y')..' 50 0 255 255 255')
msg("\169000255000"..PLAYER[id].name.." \169255255255Brought \169255000000#"..PLAYER[t].name.."")
return 1
end
if txt:sub(1,5)=="!goto" then
if pl[id].lvl >= 10 then
t = tonumber(txt:sub(7,8))
parse("setpos "..id.." "..player(t,"x").." "..player(t,"y").."")
parse('effect "flare" '..player(id,'x')..' '..player(id,'y')..' 50 0 255 255 255')
msg("\169000255000"..PLAYER[id].name.." \169255255255Teleported To \169255000000#"..PLAYER[t].name.."")
return 1
end
if txt:sub(1,4)=="!ban" then
if pl[id].lvl >= 10 then
t = tonumber(txt:sub(6,7))
local r = txt:sub(9)
local u = player(t,"usgn")
parse('banip '..t..' "'..r)
parse('banusgn '..u..' 0 "'..r)
msg(color[2]..""..pl[t].name..""..color[1].." Has Been Banned by "..color[2]..""..pl[id].name.." (Reason: "..r..")")
return 1
end
end
end
end
end
end
end
end