Huezin 4 Posted October 8, 2015 Share Posted October 8, 2015 Galera preciso de um script de o comando /mute funciona assim: você usa /mute (player),(tempo) e ele ficar sem falar até esse tempo acabar Link to comment Share on other sites More sharing options...
0 FlamesAdmin 261 Posted October 8, 2015 Share Posted October 8, 2015 (edited) talkaction.xml <talkaction log="yes" words="/mute;/desmute" access="2" event="script" value="mute.lua"/> mute.lua salve na pasta scripts: 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, ",") local GMName = getPlayerName(cid) 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, "Player with this name doesn\'t exist or is offline.") return TRUE end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você silenciou o jogador "..t[1].." por "..time.." minuto(s).") doAddCondition(player, v[tonumber(time)]) setPlayerStorageValue(player, 90000, os.time()+time*60) doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Você foi silenciado de todos canais por "..t[2].." minuto(s). Por: "..GMName..".") 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, "Player not found.") return true end if getCreatureCondition(player, CONDITION_MUTED) == false then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "este jogador não está silenciado.") return true end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "O player "..param.." não está mais silenciado.") doRemoveCondition(player, CONDITION_MUTED) setPlayerStorageValue(player, 90000, -1) doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Você não está mais silenciado.") end return true end em creaturescripts.xml <event type="login" name="MutePlayer" event="script" value="Mutar_Check.lua"/> Mutar_Check.lua salve na pasta scripts local v = {} for k = 1, 100000 do table.insert(v, createConditionObject(CONDITION_MUTED)) setConditionParam(v[k], CONDITION_PARAM_TICKS, k*1000) end function onLogin(cid) if getPlayerStorageValue(cid, 90000) >= os.time() then doAddCondition(cid, v[tonumber(getPlayerStorageValue(cid, 90000) - os.time())]) end return TRUE end Esse script, ele muta o player de todos os canais públicos Edited October 8, 2015 by AdminGabriel Link to comment Share on other sites More sharing options...
0 Huezin 4 Posted October 8, 2015 Author Share Posted October 8, 2015 amigo coloquei tudo certinho mais o player consegue falar ainda com /mute Link to comment Share on other sites More sharing options...
0 FlamesAdmin 261 Posted October 8, 2015 Share Posted October 8, 2015 /mute Nome do player,Tempo Fez isso? Link to comment Share on other sites More sharing options...
0 Huezin 4 Posted October 9, 2015 Author Share Posted October 9, 2015 ja resolvi isso obrigado Link to comment Share on other sites More sharing options...
0 FlamesAdmin 261 Posted October 9, 2015 Share Posted October 9, 2015 ok, marque como melhor resposta para que movam o tópico Link to comment Share on other sites More sharing options...
0 Huezin 4 Posted October 9, 2015 Author Share Posted October 9, 2015 não esta aparecendo aqui :x Link to comment Share on other sites More sharing options...
0 zipter98 1101 Posted October 9, 2015 Share Posted October 9, 2015 (edited) Não apareceu a opção de melhor resposta porque você criou o tópico na área de códigos prontos, né coleguinha. Movido para resolvidos. Edited October 9, 2015 by zipter98 Link to comment Share on other sites More sharing options...
Question
Huezin 4
Galera preciso de um script de o comando /mute funciona assim:
você usa /mute (player),(tempo) e ele ficar sem falar até esse tempo acabar
Link to comment
Share on other sites
7 answers to this question
Recommended Posts