Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if SERVER then
- AddCSLuaFile( "tags.lua" )
- end
- local cWhite = Color( 255, 255, 255 )
- local cBlack = Color( 0, 0, 0 )
- local cRed = Color( 255, 0, 0 )
- local cGreen = Color( 0, 255, 0 )
- local cBlue = Color( 0, 0, 255 )
- local cLightBlue = Color( 0, 255, 255 )
- local cLightGreen = Color( 04, 255, 51 )
- local cOrange = Color ( 245, 184, 0 )
- local cPurple = Color ( 184, 0, 245 )
- local cLightPurple = Color ( 204, 51, 255 )
- local cCyan = Color ( 51, 255, 204 )
- local CTags = {}
- -- CTags[Number] = { "Tag of group", "group-name", Color( of, the, tag ) }
- CTags[1] = { "[Owner]", "owner", cRed }
- CTags[2] = { "[Admin]", "admin", cGreen }
- CTags[3] = { "[TrialAdmin", "trialadmin", cLightGreen}
- CTags[4] = { "[User]", "user", cWhite }
- CTags[5] = { "[Trusted]", "trusted", cLightBlue }
- CTags[6] = { "[HeadAdmin]", "headadmin", cOrange }
- CTags[7] = { "[Moderator]", "mod", cPurple}
- CTags[8] = { "[TrialMod]", "trialmod", cLightPurple}
- CTags[9] = { "[SuperAdmin], "super admin" cCyan}
- local function ChatTags( a, b, c, d )
- local C = {}
- if d then
- table.insert( C, Color( 255, 30, 40 ) )
- table.insert( C, "*DEAD* " )
- end
- if c then
- table.insert( C, Color( 30, 160, 40 ) )
- table.insert( C, "(TEAM) " )
- end
- if a:IsValid() then
- end
- for _,v in pairs( CTags ) do
- if a:IsUserGroup( v[2] ) then
- table.insert( C, cWhite )
- table.insert( C, "[" )
- table.insert( C, v[3] )
- table.insert( C, v[1] )
- table.insert( C, cWhite )
- table.insert( C, a:GetName() )
- end
- table.insert( C, team.GetColor( a:Team() ) )
- table.insert( C, a:Nick() )
- else
- table.insert( C, "Console" )
- end
- table.insert( C, Color( 255, 255, 255 ) )
- table.insert( C, ": "..b )
- chat.AddText( unpack( C ) )
- return true
- end
- hook.Add( "OnPlayerChat", "TTTChatTags", ChatTags )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement