Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2018
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.84 KB | None | 0 0
  1. words = {}
  2. SQLS3D = { qury = executeSQLQuery }
  3. chatTime = {}
  4. lastChatMessage = {}
  5. addEventHandler("onPlayerChat", getRootElement(),
  6. function(text, msgtype, thePlayer)
  7. local account = getAccountName(getPlayerAccount(source))
  8. local name = getPlayerName(source)
  9. local root = getRootElement()
  10. local name = getPlayerName(source)
  11. local r,g,b = getPlayerNametagColor(source)
  12. local Account1 = getPlayerAccount ( source )
  13. local new = ""
  14. local iter = 0
  15. msg = string.gsub(text,"ـ","")
  16. for word in msg:gmatch("%S+") do
  17. iter = iter + 1
  18. -- for i,swr in ipairs(words) do
  19. -- local src = word:lower():gsub("%s","")
  20. -- local src = src:gsub("#%x%x%x%x%x%x","")
  21. -- local src = src:gsub("%c","")
  22. -- local src = src:gsub("%p","")
  23. -- local pat = swr:lower():gsub("%s","")
  24. -- if src:find(pat) then
  25. -- local replaceString = ""
  26. -- for x=1,word:gsub("#%x%x%x%x%x%x",""):len() do
  27. -- replaceString = replaceString.."*"
  28. -- end
  29. -- word = word:gsub(word,replaceString)
  30. -- end
  31. -- end
  32. if iter == 1 and word:len() > 0 then
  33. word = word:gsub("%a",string.upper,1)
  34. end
  35. new = new..word.." "
  36. end
  37. if new ~= "" then msg = new end
  38. text = msg
  39. if chatTime[source] and chatTime[source] + tonumber(1000) > getTickCount() then
  40. cancelEvent()
  41. outputChatBox("Espere 1 segundo para poder digitar novamente!", source, 255, 0, 0)
  42. return
  43. else
  44. chatTime[source] = getTickCount()
  45. end
  46. lastChatMessage[source] = text
  47. local r, g, b = getPlayerNametagColor(source)
  48. cancelEvent()
  49. if isObjectInACLGroup("user." .. account, aclGetGroup("Console")) then
  50. cancelEvent(true)
  51. outputChatBox("#000000➣ [#22B5D6Dono Geral#000000]#ffffff " .. name ..": " .. text, root, 255, 255, 255, true)
  52. outputServerLog("CHAT: #595959|>|[ #00ffffDono#595959 ]|<| " .. name .. ": " .. text)
  53.  
  54. elseif isObjectInACLGroup("user." .. account, aclGetGroup("SuperModerator")) then
  55. cancelEvent(true)
  56. outputChatBox("#000000➣[#D8D327SuperModerador#000000]#ffffff " .. name ..": " .. text, root, 255, 255, 255, true)
  57.  
  58. elseif isObjectInACLGroup("user." .. account, aclGetGroup("PMERJ")) then
  59. cancelEvent(true)
  60. outputChatBox("#000000[#19A0DFPMERJ#000000]#FFFFFF "..name..": " .. text, root, 255, 255, 255, true)
  61.  
  62. elseif isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then
  63. cancelEvent(true)
  64. outputChatBox("#000000➣[#8027D8Administrador#000000]#FFFFFF "..name..": " .. text, root, 255, 255, 255, true)
  65.  
  66. elseif isObjectInACLGroup("user." .. account, aclGetGroup("Moderator")) then
  67. cancelEvent(true)
  68. outputChatBox("#000000➣[#D39418Moderador#000000]#FFFFFF "..name..": " .. text, root, 255, 255, 255, true)
  69.  
  70.  
  71. elseif isObjectInACLGroup("user." .. account, aclGetGroup("SubDono")) then
  72. cancelEvent(true)
  73. outputChatBox("#000000>))[#1E90FFSubDono#000000]((<#FFFFFF "..name..": " .. text, root, 255, 255, 255, true)
  74.  
  75.  
  76. elseif isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then
  77. cancelEvent(true)
  78. outputChatBox("#000000➣[#8027D8Administrador#000000]#FFFFFF "..name..": " .. text, root, 255, 255, 255, true)
  79.  
  80. elseif isObjectInACLGroup("user." .. account, aclGetGroup("Moderator")) then
  81. cancelEvent(true)
  82. outputChatBox("#000000➣[#D39418Moderador#000000]#FFFFFF "..name..": " .. text, root, 255, 255, 255, true)
  83.  
  84.  
  85. elseif isObjectInACLGroup("user." .. account, aclGetGroup("VIP")) then
  86. cancelEvent(true)
  87. outputChatBox("#000000➣[#F0F815VIP#000000]#FFFFFF "..name.."#FFFFFF: " .. text, root, 255, 255, 255, true)
  88.  
  89. elseif isObjectInACLGroup("user." .. account, aclGetGroup("Everyone")) then
  90. cancelEvent(true)
  91. outputChatBox("#000000➣[#FFFFFFJOGADOR #4682B4ʙᴠᴄ#000000] #FFFFFF"..name..": "..text, root, 255, 255, 255, true)
  92. outputServerLog("CHAT: " .. name .. ": " .. text)
  93. end
  94. end
  95. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement