Jump to content

Triste ;( por não saber resolver esse problema


Recommended Posts

Estou com um problema

assim como faço pra por varias tags juntas no nome da pessoa

 

Tipo eu coloco 2 tags na pessoa so q so fica uma

 

exemplo : Joao coloquei vip pra ele ok ele e da bope a tag dele fica so

 

[VIP]Joao

ao inves de [VIP][BOPE]:JOAO

 

Mais um exemplo [Dono][VIP][BOPE]Joao essa maneira q quero q as tags fiquem ligadas ;(

 

 

 


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("#434343║#ffffff✖ #00FF00ĐØŇØ GEŘΔŁ#ffffff ✖#434343║ - #FFFFFF" .. name .."#ffffff™: #FFFF00" .. text, root, 255, 255, 255, true)
        outputServerLog("CHAT: [ Dono ] " .. name .. ": " .. text)

elseif isObjectInACLGroup("user." .. account, aclGetGroup("Sub-Dono")) then
     cancelEvent(true)
    outputChatBox("#434343║#ffffff✖ #c1c1c1SỮβ #FF6A00ĐØŇØ#ffffff ✖#434343║ - #FFFFFF"..name.."#ffffff™: #FF6A00 "..text, root, 255, 255, 255, true)

elseif isObjectInACLGroup("user." .. account, aclGetGroup("AdminGeral")) then
    cancelEvent(true)
    outputChatBox("#000000║ #000000✖ #00FA9AA∂мiи #c1c1c1Gєrαℓ #000000✖ #000000║- #FFFFFF"..name.."#ffffff™:#00FA9A " .. text, root, 255, 255, 255, true)

elseif isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then
    cancelEvent(true)
    outputChatBox("#ff0000║#ffffff✖ #ff0000AĐΜƗŇ#ffffff ✖#ff0000║ - #FFFFFF"..name.."#ffffff™:#ff0000 " .. text, root, 255, 255, 255, true)

elseif isObjectInACLGroup("user." .. account, aclGetGroup("EB")) then
     cancelEvent(true)
    outputChatBox("#000000[#00FF04 EXERCITO#000000-#FFFF00BRASILEIRO #000000] - #FFFFFF"..name.."#FFFFFF:#FFFFFF "..text, root, 255, 255, 255, true)

elseif isObjectInACLGroup("user." .. account, aclGetGroup("PMCIVIL")) then
     cancelEvent(true)
    outputChatBox("#000000[#ffffff #F2FF00POLICIAL #0022FFCIVIL#ffffff #000000] - #FFFFFF"..name.."#FFFFFF:#FFFFFF "..text, root, 255, 255, 255, true)

elseif isObjectInACLGroup("user." .. account, aclGetGroup("SuperModerator")) then
    cancelEvent(true)
    outputChatBox("#000000[ #00FFFFSuper-Moderador #000000] - #FFFFFF" .. name .."#FFFFFF:#00FFFF " .. text, root, 255, 255, 255, true)

elseif isObjectInACLGroup("user." .. account, aclGetGroup("Moderator")) then
    cancelEvent(true)
    outputChatBox("#000000[ #FFFF00Moderador #000000] - #FFFFFF"..name.."#FFFFFF:#FFFF00 " .. text, root, 255, 255, 255, true)

elseif   call ( getResourceFromName ( "tempovip" ), "isPlayerVip", source ) then
    cancelEvent(true)
    outputChatBox("#000000[ #00FF04VIP #000000] - #FFFFFF"..name.."#ffffff:#FFFFFF " .. text, root, 255, 255, 255, true)

elseif isObjectInACLGroup("user." .. account, aclGetGroup("Youtuber")) then
    cancelEvent(true)
    outputChatBox("#000000[ #FFFFFFYᴏᴜ#ffffff#ff0000Tᴜʙᴇʀ #000000] - #FFFFFF"..name.."#ffffff:#FFFFFF " .. text, root, 255, 255, 255, true)

elseif isObjectInACLGroup("user." .. account, aclGetGroup("PMRJ")) then
    cancelEvent(true)
    outputChatBox("#000000[ #00BBFF☠✘POLICIAL #ffffffMILITAR☠✘ #000000] - #FFFFFF"..name.."#ffffff:#FFFFFF " .. text, root, 255, 255, 255, true)

elseif isObjectInACLGroup("user." .. account, aclGetGroup("ROCAM")) then
    cancelEvent(true)
    outputChatBox("#000000[ #838383ROCAM #000000] - #FFFFFF"..name.."#FFFFFF:#909090 " .. text, root, 255, 255, 255, true)

elseif isObjectInACLGroup("user." .. account, aclGetGroup("TCP")) then
     cancelEvent(true)
    outputChatBox("#000000[#ffffff✘#00FFBF TCP#ffffff✘ #000000] - #FFFFFF"..name.."#FFFFFF:#FFFFFF "..text, root, 255, 255, 255, true)

elseif isObjectInACLGroup("user." .. account, aclGetGroup("CV")) then
    cancelEvent(true)
    outputChatBox("#000000║#FF95A00✘#FF0000 CV #FF95A00✘#000000║ - #FFFFFF"..name.."#FFFFFF:#FFFFFF " .. text, root, 255, 255, 255, true)

elseif isObjectInACLGroup("user." .. account, aclGetGroup("BOPE")) then
    cancelEvent(true)
    outputChatBox("#000000[#7F7F7F☠ #FF0000BO#000000PE#7F7F7F ☠#000000] - #FFFFFF"..name.."#ffffff:#909090 " .. text, root, 255, 255, 255, true)

elseif isObjectInACLGroup("user." .. account, aclGetGroup("ADA")) then
    cancelEvent(true)
    outputChatBox("#000000[ #A2FF00✘#2167000A.D.A#A2FF00✘ #000000] - #FFFFFF"..name.."#ffffff:#909090 " .. text, root, 255, 255, 255, true)
 
elseif isObjectInACLGroup("user." .. account, aclGetGroup("DNA")) then
    cancelEvent(true)
    outputChatBox("#000000[ #2167000D.N.A #000000] - #FFFFFF"..name.."#ffffff:#909090 " .. text, root, 255, 255, 255, true)
 
elseif isObjectInACLGroup("user." .. account, aclGetGroup("MARFIA")) then
    cancelEvent(true)
    outputChatBox("#ff0000[#7F0000✖ #FF0000MARFIA #7F0000✖#ff0000] - #FFFFFF"..name.."#ffffff™:#00FF00 " .. text, root, 255, 255, 255, true)

elseif isObjectInACLGroup("user." .. account, aclGetGroup("Everyone")) then
     cancelEvent(true)
    outputChatBox("#000000[#00FBFF➪MEMBRO] - #FFFFFF"..name.."#FFFFFF:#FFFFFF "..text, root, 255, 255, 255, true)
    outputServerLog("CHAT: [ Jogador ] " .. name .. ": " .. text)
        end
    end
)


 

Link to comment
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
    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("BOPE")) then 
   TAG_BOPE = "[BOPE]" 
else
   TAG_BOPE = "" 
end
	
if isObjectInACLGroup("user." .. account, aclGetGroup("VIP")) then 
   TAG_VIP = "[VIP]" 
else
   TAG_VIP = ""
end
	
if isObjectInACLGroup("user." .. account, aclGetGroup("Everyone")) then 
   TAG_EVERYONE = "[Jogador]"
else
   TAG_EVERYONE = "[Guest]"
end
	
    outputChatBox(""..TAG_BOPE..""..TAG_VIP..""..TAG_EVERYONE.." - #FFFFFF"..name.."#ffffff™: #FF6A00 "..text, root, 255, 255, 255, true)

end
)

É uma das formas possíveis dentre outras formas,

Edited by Angelo Pereira
  • Like 1
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...