Ir para conteúdo

[TalkActions] /mute, /desmute apenas no Help-Channel!

Featured Replies

Postado

Em data/talkactions/scripts crie um arquivo muteplayer.lua e coloque dentro:

function onSay(cid, words, param, channel)
if(param == '') then
doPlayerSendTextMessage(cid, 21, "Digite o comando correto.")
return true
end

local t = string.explode(param, ",")
player = getPlayerByName(t[1])
local condition = createConditionObject(CONDITION_MUTED)

if(not t[2] or t[2] == '') then
doPlayerSendTextMessage(cid, 21, "Digite o comando correto.")
end

if t[2] then
time = tonumber(t[2]*60000) -- 10*1000 is 10 seconds.
if(isPlayer(player) == TRUE and getPlayerGroupId(cid) > getPlayerGroupId(player) and getPlayerFlagValue(player, PLAYERFLAG_CANNOTBEMUTED) == false) then
setConditionParam(condition, CONDITION_PARAM_TICKS, time)
setConditionParam(condition, CONDITION_PARAM_SUBID, 4)
doAddCondition(player, condition)
doPlayerSendTextMessage(player, MESSAGE_STATUS_WARNING, "Voce foi silenciado no Help-Channel por " .. getPlayerName(cid) .. " por " .. t[2] .. " minuto(s).")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getCreatureName(player) .. " foi silenciado no Help-Channel por " .. t[2] .. " minuto(s).")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Jogador " .. t[1] .. " não existe ou não está online.")
end
end

return true
end

Salve e vá em talkactions/talkactions.xml e adicione:

<talkaction log="yes" words="/mute;/desmute" access="1" event="script" value="muteplayer.lua"/>

Salve e de /reload talkactions!

Pronto é só usar o /mute, nome, minutos

  • Respostas 6
  • Visualizações 1.7k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Em data/talkactions/scripts crie um arquivo muteplayer.lua e coloque dentro: function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, 21, "Digite o comando corret

Postado

Obrigado por compartilhar o script , creio q muitos estao atras dele, como eu...

 

Porem ele nao ta funcionando, não dá erro nenhum, manda mensagem que a pessoa foi silenciada mais ela continua falando no help etc...

 

16:12 Voce foi silenciado no Help-Channel por {ADM} Legend por 5 minuto(s).

 

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.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo