add sborka
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
util.AddNetworkString("EventMessage")
|
||||
util.AddNetworkString("AnnounceMessage")
|
||||
|
||||
function PLUGIN:PlayerSay(ply, text)
|
||||
local userGroup = ply:GetUserGroup() or ""
|
||||
if userGroup == "superadmin" or userGroup == "ivent" then
|
||||
if string.StartWith(text, "/event ") then
|
||||
local msg = string.sub(text, 8)
|
||||
net.Start("EventMessage")
|
||||
net.WriteString(msg)
|
||||
net.Broadcast()
|
||||
return ""
|
||||
elseif string.StartWith(text, "/annonce ") then
|
||||
local msg = string.sub(text, 10)
|
||||
net.Start("AnnounceMessage")
|
||||
net.WriteString(msg)
|
||||
net.Broadcast()
|
||||
return ""
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user