kkevihg009 Posted August 24, 2023 Share Posted August 24, 2023 eu tentei vincular o meu sistema de id com o meu sitema de chat , eu coloquei [..ID] por que eu ja vi isso em varios mods e script alguem consegue me audar a fazer isso? 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("[..ID..]#0000ff║ Staff #0000ff║ - #ffffff" .. name .."#ffffff™:#8A2BE2 " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: [ Dono ] " .. name .. ": " .. text) elseif isObjectInACLGroup("user." .. account, aclGetGroup("SuperModerator")) then cancelEvent(true) outputChatBox("#000000║#ffffff✘ #00ffffS#ffffff.#00ffffMᴏᴅ#ffffff ✘#000000║ - #FFFFFF" .. name .."#ffffff™:#00ffff " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: [ S.Mod ] " .. name .. ": " .. text) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then cancelEvent(true) outputChatBox("#000000║#ffffff✘ #ff0000Aᴅᴍɪɴ#ffffff ✘#000000║ - #ffffff"..name.."#ffffff™:#ff0000 " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: [ Admin ] " .. name .. ": " .. text) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Moderator")) then cancelEvent(true) outputChatBox("#000000║#ffffff✘ #ffff00Mᴏᴅ#ffffff ✘#000000║ - #FFFFFF"..name.."#ffffff™:#ffff00 " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: [ Moderador ] " .. name .. ": " .. text) elseif isObjectInACLGroup("user." .. account, aclGetGroup("VIP")) then cancelEvent(true) outputChatBox("#000000║#ffffff✘ #ff0000V#ffff00ɪ#00ff00P#ffffff ✘#000000║ - #FFFFFF"..name.."#ffffff™:#FFFFFF " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: [ VIP ] " .. name .. ": " .. text) elseif isObjectInACLGroup("user." .. account, aclGetGroup("YOUTUBE")) then cancelEvent(true) outputChatBox("#000000║#ffffff✘ #000000Yᴏᴜ#ffffff.#ff0000Tᴜʙᴇʀ#ffffff ✘#000000║ - #FFFFFF"..name.."#ffffff:#FFFFFF " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: [ YOUTUBE ] " .. name .. ": " .. text) elseif isObjectInACLGroup("user." .. account, aclGetGroup("FT")) then cancelEvent(true) outputChatBox("#000000║#ffffff✘ #0000ffFORCA#ffffff.#ff0000TATICA#ffffff ✘#000000║ - #FFFFFF"..name.."#ffffff:#FFFFFF " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: [ FT ] " .. name .. ": " .. text) elseif isObjectInACLGroup("user." .. account, aclGetGroup("PM")) then cancelEvent(true) outputChatBox("#000000║#ffffff✘ #ff0000P#ffffff.#ff0000M#ffffff ✘#000000║ - #FFFFFF"..name.."#ffffff:#FFFFFF " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: [ PM ] " .. name .. ": " .. text) elseif isObjectInACLGroup("user." .. account, aclGetGroup("BOPE")) then cancelEvent(true) outputChatBox("#000000║#ffffff✘ #555555BOPE#ffffff ✘#000000║ - #FFFFFF"..name.."#ffffff:#FFFFFF " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: [ BOPE ] " .. name .. ": " .. text) elseif isObjectInACLGroup("user." .. account, aclGetGroup("ROTA")) then cancelEvent(true) outputChatBox("#000000║#ffffff✘ #555555ROTA#ffffff ✘#000000║ - #FFFFFF"..name.."#ffffff:#FFFFFF " .. text, root, 255, 255, 255, true) outputServerLog("CHAT: [ ROTA ] " .. name .. ": " .. text) elseif isObjectInACLGroup("user." .. account, aclGetGroup("PCC")) then cancelEvent(true) outputChatBox("#000000║#ffffff✘ #ff0000P#ffffff.#ff0000C#ffffff.#ff0000C#ffffff ✘#000000║ - #FFFFFF"..name.."#FFFFFf:#FFFFFF "..text, root, 255, 255, 255, true) outputServerLog("CHAT: [ PCC ] " .. name .. ": " .. text) elseif isObjectInACLGroup("user." .. account, aclGetGroup("FIXA")) then cancelEvent(true) outputChatBox("#000000║#ffffff✘ #00ffffF!xA#ffffff ✘#000000║ - #FFFFFF"..name.."#FFFFFf:#FFFFFF "..text, root, 255, 255, 255, true) outputServerLog("CHAT: [ FIXA ] " .. name .. ": " .. text) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Everyone")) then cancelEvent(true) outputChatBox("#228b22║#228b22 Jogador #00ffffLT #228b22║ - #FFFFFF"..name.."#FFFFFf:#FFFFFF "..text, root, 255, 255, 255, true) outputServerLog("CHAT: [ Jogador ] " .. name .. ": " .. text) end end ) o get elementdata e ID Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now