Ir para conteúdo

Featured Replies

Postado

Alguém me passa uma Script para poder mutar um player que seja apenas no Help. TFS 0.3.6 ou o 0.4 Funciona ! 

 

PS: Tentei testar outros que encontrei mais ele mutava em todos chats até no default  :facepalm: [ Então reforçando somente no Help :/ ] 

  • Respostas 7
  • Visualizações 2.5k
  • Created
  • Última resposta

Top Posters In This Topic

Postado

muteplayer.lua

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

talkactions.xml

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

x1fCxnI.png

Postado

eu tetei em tfs 0.3.6 e deu este erro:

[01/08/2015 09:40:52] [Error - TalkAction Interface] 
[01/08/2015 09:40:52] data/talkactions/scripts/muteplayer.lua:onSay
[01/08/2015 09:40:52] Description: 
[01/08/2015 09:40:52] (luaCreateConditionObject) This function can only be used while loading the script.
 
[01/08/2015 09:40:52] [Error - TalkAction Interface] 
[01/08/2015 09:40:52] data/talkactions/scripts/muteplayer.lua:onSay
[01/08/2015 09:40:52] Description: 
[01/08/2015 09:40:52] (luaSetConditionParam) This function can only be used while loading the script.
 
[01/08/2015 09:40:52] [Error - TalkAction Interface] 
[01/08/2015 09:40:52] data/talkactions/scripts/muteplayer.lua:onSay
[01/08/2015 09:40:52] Description: 
[01/08/2015 09:40:52] (luaSetConditionParam) This function can only be used while loading the script.
 
[01/08/2015 09:40:52] [Error - TalkAction Interface] 
[01/08/2015 09:40:52] data/talkactions/scripts/muteplayer.lua:onSay
[01/08/2015 09:40:52] Description: 
[01/08/2015 09:40:52] (luaDoAddCondition) Condition not found

wq3bBzt.png
Pokémon Dust Evolution
 
É aonde começa sua nova aventura!! 

 

Facebook

 
Verifique Atualizações

 

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