Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- words = {}
- SQLS3D = { qury = executeSQLQuery }
- chatTime = {}
- lastChatMessage = {}
- addEventHandler("onPlayerChat", getRootElement(),
- function(text, msgtype, thePlayer)
- local account = getAccountName(getPlayerAccount(source))
- local name = getPlayerName(source)
- local root = getRootElement()
- local name = getPlayerName(source)
- local r,g,b = getPlayerNametagColor(source)
- local Account1 = getPlayerAccount ( source )
- local new = ""
- local iter = 0
- msg = string.gsub(text,"ـ","")
- for word in msg:gmatch("%S+") do
- iter = iter + 1
- -- for i,swr in ipairs(words) do
- -- local src = word:lower():gsub("%s","")
- -- local src = src:gsub("#%x%x%x%x%x%x","")
- -- local src = src:gsub("%c","")
- -- local src = src:gsub("%p","")
- -- local pat = swr:lower():gsub("%s","")
- -- if src:find(pat) then
- -- local replaceString = ""
- -- for x=1,word:gsub("#%x%x%x%x%x%x",""):len() do
- -- replaceString = replaceString.."*"
- -- end
- -- word = word:gsub(word,replaceString)
- -- end
- -- end
- if iter == 1 and word:len() > 0 then
- word = word:gsub("%a",string.upper,1)
- end
- new = new..word.." "
- end
- if new ~= "" then msg = new end
- text = msg
- if chatTime[source] and chatTime[source] + tonumber(1000) > getTickCount() then
- cancelEvent()
- outputChatBox("Espere 1 segundo para poder digitar novamente!", source, 255, 0, 0)
- return
- else
- chatTime[source] = getTickCount()
- end
- lastChatMessage[source] = text
- local r, g, b = getPlayerNametagColor(source)
- cancelEvent()
- if isObjectInACLGroup("user." .. account, aclGetGroup("Console")) then
- cancelEvent(true)
- outputChatBox("#000000➣ [#22B5D6Dono Geral#000000]#ffffff " .. name ..": " .. text, root, 255, 255, 255, true)
- outputServerLog("CHAT: #595959|>|[ #00ffffDono#595959 ]|<| " .. name .. ": " .. text)
- elseif isObjectInACLGroup("user." .. account, aclGetGroup("SuperModerator")) then
- cancelEvent(true)
- outputChatBox("#000000➣[#D8D327SuperModerador#000000]#ffffff " .. name ..": " .. text, root, 255, 255, 255, true)
- elseif isObjectInACLGroup("user." .. account, aclGetGroup("PMERJ")) then
- cancelEvent(true)
- outputChatBox("#000000[#19A0DFPMERJ#000000]#FFFFFF "..name..": " .. text, root, 255, 255, 255, true)
- elseif isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then
- cancelEvent(true)
- outputChatBox("#000000➣[#8027D8Administrador#000000]#FFFFFF "..name..": " .. text, root, 255, 255, 255, true)
- elseif isObjectInACLGroup("user." .. account, aclGetGroup("Moderator")) then
- cancelEvent(true)
- outputChatBox("#000000➣[#D39418Moderador#000000]#FFFFFF "..name..": " .. text, root, 255, 255, 255, true)
- elseif isObjectInACLGroup("user." .. account, aclGetGroup("SubDono")) then
- cancelEvent(true)
- outputChatBox("#000000>))[#1E90FFSubDono#000000]((<#FFFFFF "..name..": " .. text, root, 255, 255, 255, true)
- elseif isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then
- cancelEvent(true)
- outputChatBox("#000000➣[#8027D8Administrador#000000]#FFFFFF "..name..": " .. text, root, 255, 255, 255, true)
- elseif isObjectInACLGroup("user." .. account, aclGetGroup("Moderator")) then
- cancelEvent(true)
- outputChatBox("#000000➣[#D39418Moderador#000000]#FFFFFF "..name..": " .. text, root, 255, 255, 255, true)
- elseif isObjectInACLGroup("user." .. account, aclGetGroup("VIP")) then
- cancelEvent(true)
- outputChatBox("#000000➣[#F0F815VIP#000000]#FFFFFF "..name.."#FFFFFF: " .. text, root, 255, 255, 255, true)
- elseif isObjectInACLGroup("user." .. account, aclGetGroup("Everyone")) then
- cancelEvent(true)
- outputChatBox("#000000➣[#FFFFFFJOGADOR #4682B4ʙᴠᴄ#000000] #FFFFFF"..name..": "..text, root, 255, 255, 255, true)
- outputServerLog("CHAT: " .. name .. ": " .. text)
- end
- end
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement