Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.86 KB | None | 0 0
  1. GMAD Chat Tags (ULX Only) 2
  2. {
  3. "description": "Description",
  4. "type": "effects",
  5. "tags":
  6. [
  7. "fun",
  8. "roleplay"
  9. ]
  10. }
  11. // Originally Made By: TyGuy
  12. // Edited By: CaptainDeagle62
  13.  
  14. local Tags =
  15. {
  16. --Group --Tag --Color
  17. {"admin", "Admin", Color(0, 0, 255, 255) },
  18. {"superadmin", "Wlasciciel", Color(255, 0, 0, 255) },
  19. {"VIP", "VIP", Color(245, 121, 10, 0) },
  20. {"moderator", "Moderator", Color(217, 220, 101, 0) },
  21. {"Youtuber", "Youtuber", Color(18, 214, 204, 0) },
  22. {"user", "Gracz", Color(146, 182, 182, 0) },
  23. {"Bywalec", "Bywalec", Color(255, 119, 255, 0) },
  24. {"Staly Gracz", "Staly Gracz", Color(199, 203, 254, 0) },
  25. {"Veteran", "Veteran", Color(73, 209, 73, 0) },
  26. {"Pro Gamer", "Pro Gamer", Color(153, 153, 102, 0) },
  27. {"Nolife", "Nolife", Color(0, 121, 121, 0) },
  28. }
  29.  
  30. hook.Add("OnPlayerChat", "Tags", function(ply, Text, Team, PlayerIsDead)
  31. if ply:IsValid() then
  32. for k,v in pairs(Tags) do
  33. if ply:IsUserGroup(v[1]) then
  34. if Team then
  35. if ply:Alive() then
  36. chat.AddText(Color(0, 204, 0, 255), "{TEAM} ", v[3], v[2], Color(50, 50, 50, 255), "| ", v[3], ply:Nick(), color_white, ": ", Color(255, 255, 255, 255), Text)
  37. else
  38. chat.AddText(Color(255, 0, 0, 255), "*DEAD*", Color(0, 204, 0, 255), "{TEAM} ", v[3], v[2], Color(50, 50, 50, 255), "| ", v[3], ply:Nick(), color_white, ": ", Color(255, 255, 255, 255), Text)
  39. end
  40. return true
  41. end
  42. if ply:IsPlayer() then
  43. if ply:Alive() then
  44. chat.AddText(Color(255, 0, 0, 255), "", v[3], v[2], Color(50, 50, 50, 255), "| ", v[3], ply:Nick(), color_white, ": ", Color(255, 255, 255, 255), Text)
  45. return true
  46. elseif !ply:Alive() then
  47. chat.AddText(Color(255, 0, 0, 255), "*Dead* ", v[3], v[2], Color(50, 50, 50, 255), "| ", v[3], ply:Nick(), color_white, ": ", Color(255, 255, 255, 255), Text)
  48. return true
  49. end
  50. end
  51. end
  52. end
  53. end
  54. end)// Server Side
  55. // Originally Made By: TyGuy
  56. // Edited By: CaptainDeagle62
  57. AddCSLuaFile( "cl_chat_tags.lua" )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement