CapsAdmin

Untitled

May 13th, 2011
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.54 KB | None | 0 0
  1.     if CLIENT then
  2.        
  3.         old.chat_AddText = old.chat_AddText or chat.AddText
  4.        
  5.         function chat.AddText(...)
  6.             if playernick.enabled then
  7.                 local new = {}
  8.                 for key, value in pairs({...}) do
  9.                     if type(value) == "Player" then
  10.                         table.insert(new, team.GetColor(value:Team()))
  11.                         table.insert(new, value:GetName())
  12.                         table.insert(new, Color(151,211,255))
  13.                     else
  14.                         table.insert(new, value)
  15.                     end
  16.                 end
  17.                
  18.                 return old.chat_AddText(unpack(new))
  19.             end
  20.            
  21.             return old.chat_AddText(...)
  22.         end
  23.  
  24.     end
Advertisement
Add Comment
Please, Sign In to add comment