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
