Ir para conteúdo

Featured Replies

Postado

estou com um sistema de mute, mais quando você muta uma pessoa permanente quando ele desloga e loga de novo ele pode falar normalmente... se é pra mutar uma pessoa permanente ele tem que ficar com a boca costurada não é mesmo? :)

Script

Spoiler

function onSay(cid, words, param, channel)
    if(param == '') then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
        return true
    end

    local t = string.explode(param, ",")
    local pid = getPlayerByNameWildcard(t[1])
    if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O jogador " .. t[1] .. " nao esta online.")
        return true
    end

    if(getPlayerAccess(cid) <= getPlayerAccess(pid) or getPlayerFlagValue(pid, PLAYERFLAG_CANNOTBEMUTED)) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Cannot perform action.")
        return true
    end

    if(words:sub(2, 2) == "u") then
        doRemoveCondition(pid, CONDITION_MUTED, 0)
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getCreatureName(pid) .. " foi desmutado.")
        return true
    end

    local time = tonumber(t[2])
    if(not time or time < 1) then
        time = -1
    end

    doMutePlayer(pid, time)
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getCreatureName(pid) .. " foi mutado por, " .. (time < 1 and "ou para sempre" or " " .. time .. " segundos") .. ".")
    return true
end

 

Postado
  • Autor
6 horas atrás, Vodkart disse:

minha distro é otx servidor 8.60, o da alavanca funcionou

image.thumb.png.5c8d7f934020d27cc0ff243df7ceaef9.png

 

Script

Spoiler

local v = {}
for k = 1, 100 do
table.insert(v, createConditionObject(CONDITION_MUTED))
setConditionParam(v[k], CONDITION_PARAM_TICKS, k*60*1000)
end
function onSay(cid, words, param)
if (words == "/mute") then
local t = string.explode(param, ",")  
if param == '' then  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.")  return true end  
local player,time,pid = getPlayerByName(t[1]),t[2],getPlayerByNameWildcard(t[1])  
if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then  
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O jogador com este nome nao existe ou esta offline.")  return TRUE  end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce mutou o jogador "..t[1].." por "..time.." minutos.")
doAddCondition(player, v[tonumber(time)])
setPlayerStorageValue(player, 90000, os.time()+time*60)
doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Voce foi mutado por "..time.." minutos.")

elseif (words == "/desmute") then
if param == '' then  doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.")  return true end  
local player = getPlayerByNameWildcard(param)
if(not player)then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Jogador nao encontrado.") return true end
if getCreatureCondition(player, CONDITION_MUTED) == false then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "este jogador nao esta mutado.") return true end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce desmutou o jogador "..param..".")
doRemoveCondition(player, CONDITION_MUTED)
setPlayerStorageValue(player, 90000, -1)
doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Voce foi desmutado.")
end
return true  
end

 

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo