ulib groups

Ya for garrys mod! and the awesome Ulib/ULX admin mod!

Put this in ulib/autorun all credit goes to Science.

Edit: Also next time put your help thread in Help & Support.

[lua]if SERVER then
hook.Add( “PlayerSay”, “Tags”, function(ply, text, team)
local rank
if ply:IsSuperAdmin() then
rank = “Superadmin”
elseif ply:IsAdmin() then
rank = “Admin”
else
rank = “User”
end
umsg.Start("_Tagsay")
umsg.String(text)
umsg.String(rank)
umsg.Entity(ply)
umsg.End()
return false
end)

end

if CLIENT then
usermessage.Hook("_Tagsay", function (um)
local text = um:ReadString()
local rank = um:ReadString() or “User”
local ply = um:ReadEntity()
if !rank or !text or !ply then return end
ChatAdd(rank,text, ply)
end)

function ChatAdd(rank, text, ply)
	chat.AddText("",Color(255,125,0),"[",Color(125,0,0),rank,Color(255,125,0),"] ",Color(0,125,25),ply:Nick()..": ",Color(255,255,255),text)
end

end[/lua]