Postado Fevereiro 28, 2014 11 anos Alguem sabe me fazer um script que deixaria apenas players mudo? Um script que assim, apenas Tutores, God e ADM poderia usar! O tipo do comando assim /mudo, player, TEMPO QUE FICA MUDO O script se for possivel so pegara em players ! Obrigado, REP+ !
Postado Fevereiro 28, 2014 11 anos Solução Crie um arquivo .lua na pasta Talkaction chamado mute.lua, e adicione isso : 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, "Player " .. t[1] .. " is not currently 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) .. " has been unmuted.") 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) .. " has been muted for" .. (time < 1 and "ever" or " " .. time .. " seconds") .. ".") return true end Abra talkaction.xml e adicione essa tag : <talkaction log="yes" words="/mute;/unmute" access="3" event="script" value="mute.lua"/> Para utilizar o comando basta falar : /mute player, tempo Lembrando que o tempo é em segundos.
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.