Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Tags = {}
- Tags["superadmin"] = { Color( 255, 0, 0 ), "SuperAdmin", Color( 255, 0, 0 ) }
- Tags["admin"] = { Color( 255, 255, 0 ), "Admin", Color( 255, 255, 0 ) }
- Tags["moderator"] = { Color( 0, 255, 204 ), "Mod", Color( 0, 255, 204 ) }
- Tags["vip"] = { Color( 255, 102, 51 ), "VIP", Color( 255, 102, 51 ) }
- Tags["supporter"] = { Color(51, 255, 51), "Supporter", Color( 25, 75, 10 ) }
- Tags["user"] = { Color(50, 210, 50), "User", Color( 25, 75, 10 ) }
- local function AddChatTags( ply, msg, team, dead, prefixText, col1, col2 )
- if GAMEMODE.FolderName == "darkrp" then
- local text = {}
- local tag = Tags[ply:GetNWString("usergroup")]
- if tag then
- table.insert( text, tag[3] )
- table.insert( text, "[" )
- table.insert( text, tag[1] )
- table.insert( text, tag[2] )
- table.insert( text, tag[3] )
- table.insert( text, "] " )
- end
- table.insert( text, col1 )
- table.insert( text, prefixText )
- table.insert( text, col2 )
- table.insert( text, ": " .. msg )
- chat.AddText( unpack( text ) )
- return true
- end
- end
- hook.Add( "OnPlayerChat", "DarkRPChatTags", AddChatTags )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement