Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.34 KB | None | 0 0
  1. local Tunnel = module("vrp", "lib/Tunnel")
  2. local Proxy = module("vrp", "lib/Proxy")
  3.  
  4. vRP = Proxy.getInterface("vRP")
  5.  
  6. AddEventHandler('chatMessage', function(source, name, msg)
  7. if msg:sub(1,4) == "/twt" then
  8. CancelEvent()
  9. local user_id = vRP.getUserId({source})
  10. if user_id ~= nil then
  11. vRP.getUserIdentity({user_id, function(identity)
  12. if identity ~= nil then
  13. TriggerClientEvent('chatMessage', -1, "[@Twitter] ("..identity.firstname.. " "..identity.name.. ")".. " [#" .. user_id .. "]", { 10, 205, 245 }, msg:sub(5))
  14. end
  15. end})
  16. end
  17. elseif msg:sub(1,4) == "/forarp" then
  18. CancelEvent()
  19. local user_id = vRP.getUserId({source})
  20. if user_id ~= nil then
  21. vRP.getUserIdentity({user_id, function(identity)
  22. if identity ~= nil then
  23. TriggerClientEvent('chatMessage', -1, "[@ForaRP] ("..identity.firstname.. " "..identity.name.. ")".. " [#" .. user_id .. "]", { 34, 209, 25 }, msg:sub(5))
  24. end
  25. end})
  26. end
  27. elseif msg:sub(1,4) == "/192" then
  28. CancelEvent()
  29. local user_id = vRP.getUserId({source})
  30. if user_id ~= nil then
  31. vRP.getUserIdentity({user_id, function(identity)
  32. if identity ~= nil then
  33. TriggerClientEvent('chatMessage', -1, "^1[@192] ("..identity.firstname.. " "..identity.name.. ")".. " [#" .. user_id .. "]", { 10, 205, 245 }, msg:sub(5))
  34. end
  35. end})
  36. end
  37. elseif msg:sub(1,4) == "/190" then
  38. CancelEvent()
  39. local user_id = vRP.getUserId({source})
  40. if user_id ~= nil then
  41. vRP.getUserIdentity({user_id, function(identity)
  42. if identity ~= nil then
  43. TriggerClientEvent('chatMessage', -1, "[@190] ("..identity.firstname.. " "..identity.name.. ")".. " [#" .. user_id .. "]", { 50, 41, 219 }, msg:sub(5))
  44. end
  45. end})
  46. end
  47. elseif msg:sub(1,7) == "/ilegal" then
  48. CancelEvent()
  49. local user_id = vRP.getUserId({source})
  50. if user_id ~= nil then
  51. vRP.getUserIdentity({user_id, function(identity)
  52. if identity ~= nil then
  53. TriggerClientEvent('chatMessage', -1, "[@Anonimo] ", { 128,128,128 }, msg:sub(9))
  54. end
  55. end})
  56. end
  57. elseif msg:sub(1,4) == "/olx" then
  58. CancelEvent()
  59. local user_id = vRP.getUserId({source})
  60. if user_id ~= nil then
  61. vRP.getUserIdentity({user_id, function(identity)
  62. if identity ~= nil then
  63. TriggerClientEvent('chatMessage', -1, "^3[@Olx] ("..identity.firstname.. " "..identity.name.. ")".. " [#" .. user_id .. "]",{ 10, 205, 245 }, msg:sub(6))
  64. end
  65. end})
  66. end
  67. elseif msg:sub(1,4) == "/192" then
  68. CancelEvent()
  69. local user_id = vRP.getUserId({source})
  70. if user_id ~= nil then
  71. vRP.getUserIdentity({user_id, function(identity)
  72. if identity ~= nil then
  73. TriggerClientEvent('chatMessage', -1, "^1[@192] ("..identity.firstname.. " "..identity.name.. ")".. " [#" .. user_id .. "]", { 10, 205, 245 }, msg:sub(5))
  74. end
  75. end})
  76. end
  77. end
  78. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement