Advertisement
Guest User

asrftrehrtgyjtgfrhdrew

a guest
Aug 4th, 2015
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.12 KB | None | 0 0
  1. local Tags = {}
  2. Tags["superadmin"] = { Color( 255, 0, 0 ), "SuperAdmin", Color( 255, 0, 0 ) }
  3. Tags["admin"] = { Color( 255, 255, 0 ), "Admin", Color( 255, 255, 0 ) }
  4. Tags["moderator"] = { Color( 0, 255, 204 ), "Mod", Color( 0, 255, 204 ) }
  5. Tags["vip"] = { Color( 255, 102, 51 ), "VIP", Color( 255, 102, 51 ) }
  6. Tags["supporter"] = { Color(51, 255, 51), "Supporter", Color( 25, 75, 10 ) }
  7. Tags["user"] = { Color(50, 210, 50), "User", Color( 25, 75, 10 ) }
  8.  
  9. local function AddChatTags( ply, msg, team, dead, prefixText, col1, col2 )
  10.    
  11.     if GAMEMODE.FolderName == "darkrp" then
  12.        
  13.         local text = {}
  14.         local tag = Tags[ply:GetNWString("usergroup")]
  15.        
  16.         if tag then
  17.             table.insert( text, tag[3] )
  18.             table.insert( text, "[" )
  19.             table.insert( text, tag[1] )
  20.             table.insert( text, tag[2] )
  21.             table.insert( text, tag[3] )
  22.             table.insert( text, "] " )
  23.         end
  24.        
  25.         table.insert( text, col1 )
  26.         table.insert( text, prefixText )
  27.        
  28.         table.insert( text, col2 )
  29.         table.insert( text, ": " .. msg )
  30.        
  31.         chat.AddText( unpack( text ) )
  32.        
  33.         return true
  34.    
  35.     end
  36.  
  37. end
  38. hook.Add( "OnPlayerChat", "DarkRPChatTags", AddChatTags )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement