Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if CLIENT then
- net.Receive("adminRequest", function( len )
- local message = net.ReadString()
- local ply = net.ReadEntity()
- local admins = {"superadmin", "admin", "moderator"}
- if IsValid(LocalPlayer()) and table.HasValue(admins, LocalPlayer():GetUserGroup()) then
- chat.AddText( Color( 171, 0, 255, 255), "=============[", Color( 255, 255, 255, 255), "Case Received", Color( 171, 0, 255, 255), "]=============")
- chat.AddText( Color( 0, 255, 0, 255), ply:Nick(), Color( 255, 255, 255, 255), ":")
- chat.AddText( Color( 255, 255, 255, 255), message)
- chat.AddText( Color( 171, 0, 255, 255), "============================")
- end
- end)
- end
- if SERVER then
- util.AddNetworkString("adminRequest")
- hook.Add( "PlayerSay", "Admin Request", function( ply, text )
- local phrase = "@"
- local message = ""
- local cmd = ""
- if string.match(text, phrase) == phrase then
- cmd = phrase
- message = string.Replace( text, phrase, "")
- end
- if string.lower(cmd) == string.lower(phrase) then
- net.Start("adminRequest")
- net.WriteString(message)
- net.WriteEntity(ply)
- net.Send(ply)
- return ""
- end
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement