RikeBR Posted February 20, 2019 Share Posted February 20, 2019 Olá a todos. Estou com um sistema de chat privado e quero colocar ele pra quando a pessoa for mutada pelo painel admin do chat global, ela também seja mutada do chat privado juntamente, como posso fazer isso? function pmCommand (player, command, id, ...) if tonumber(id) and (...) then local pmWords = { ... } local pmMessage = table.concat(pmWords," ") local target = getPlayerFromID(tonumber(id)) if target then local pmm = getElementData (player, "pmm" ) if pmm == true then outputChatBox ( "#C09F96[SERVER]: #ffffffVocê esta Mutado!",player, 255, 0, 0, true) else if getElementData(target,"pmb") == false then if getElementData(player, "AnonAdmin") == true then outputChatBox ("#FFFF00( PM ) #FFFFFFPM Recebida #FF0000Anônimamente#FFFFFF: #CFCFCF" .. pmMessage, target, 255, 165, 0, true) outputChatBox ("#FFFF00( PM ) #FFFFFFPM Enviada #FF0000Anônimamente #FFFFFFpara " .. getPlayerName(target) .. " #FFFFFF(" .. id .. ")", player, 255, 165, 0, true) outputServerLog("[Game_ID_Logs PM Anom] " .. getPlayerName(player):gsub("#%x%x%x%x%x%x","").." (" .. tonumber(getPlayerID(player)) .. ") para " .. getPlayerName(target):gsub("#%x%x%x%x%x%x","").." (" .. tonumber(getPlayerID(target)) .. "): " .. pmMessage.."") for a, b in ipairs(getElementsByType("player")) do local bcc = getAccountName(getPlayerAccount(b)) if target ~= b and player ~= b and isObjectInACLGroup("user."..bcc, aclGetGroup("Dono")) then outputChatBox("#FF0000( Leitor PM Anônima ) #FFFFFFMesangem para " .. getPlayerName(target) .. " #FFFFFF(" .. id .. "): #CFCFCF"..pmMessage, b, 255, 255, 255, true) end end for a, b in ipairs(getElementsByType("player")) do local bcc = getAccountName(getPlayerAccount(b)) if target ~= b and player ~= b and isObjectInACLGroup("user."..bcc, aclGetGroup("Dono")) then outputChatBox("#FF0000( Leitor PM Anônima ) #FFFFFF" .. getPlayerName(player) .. " #CFCFCFpara #FFFFFF" .. getPlayerName(target)..": #CFCFCF"..pmMessage, b, 255, 255, 255, true) end end else outputChatBox ("#FFFF00( PM ) #FFFFFFPM Recebida de #FFFFFF" .. getPlayerName(player) .. " #FFFFFF(" .. tonumber(getPlayerID(player)) .. "): #CFCFCF" .. pmMessage, target, 255, 165, 0, true) outputChatBox ("#FFFF00( PM ) #FFFFFFPM Enviada para #FFFFFF" .. getPlayerName(target) .. " #FFFFFF(" .. tonumber(getPlayerID(target)) .. "): #CFCFCF" .. pmMessage, player, 255, 165, 0, true) outputServerLog ( "[Game_ID_Logs PM] " .. getPlayerName(player):gsub("#%x%x%x%x%x%x","").." (" .. tonumber(getPlayerID(player)) .. ") para " .. getPlayerName(target):gsub("#%x%x%x%x%x%x","").." (" .. tonumber(getPlayerID(target)) .. "): " .. pmMessage.."" ) for a, b in ipairs(getElementsByType("player")) do local bcc = getAccountName(getPlayerAccount(b)) if target ~= b and player ~= b and isObjectInACLGroup("user."..bcc, aclGetGroup("Dono")) then outputChatBox("#FF0000( Leitor PM ) #FFFFFF" .. getPlayerName(player) .. " #FFFFFF("..(getPlayerID(player) or "???")..") #CFCFCFpara #FFFFFF".. getPlayerName(target).." #FFFFFF("..id.."): #CFCFCF"..pmMessage.."", b, 255, 255, 255, true) end end end else outputChatBox ("#ffffffAs mensagens privadas estão #ff0000Desativadas!", player, 255, 255, 255, true) end end else outputChatBox ("#FFFFFFID (" .. id .. ") Invalido.", player, 255, 255, 255, true) end else outputChatBox ("#FFFFFFUse /pm (id) (texto)", player, 255, 255, 255, true) end end addCommandHandler ("pm", pmCommand) Link to comment
Other Languages Moderators androksi Posted February 20, 2019 Other Languages Moderators Share Posted February 20, 2019 isPlayerMuted 1 Link to comment
RikeBR Posted February 20, 2019 Author Share Posted February 20, 2019 Obrigado, consegui resolver! 1 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