Postado Agosto 1, 2015 9 anos 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
Postado Agosto 1, 2015 9 anos Tópico aprovado e movido a área correta, obrigado por compartilhar. Você recebeu um REP pela contribuição.
Postado Agosto 1, 2015 9 anos 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.