Ir para conteúdo

Featured Replies

Postado

TFS 1 deu um probleminha...

 

A player with that name is not online.

Apenas isso!!

Tudo certinho, mas da isso!! E /unmute nao mudou nada.

Obs: Uso TFS 1.0

 

Estou baixando o tfs 1.0, pra ver quais são os erros e arrumar de acordo com as funções corretas.

 

 

 

duas perguntas basicas:

 

1 eu nao tenho ideia que tfs é poketibia, esse script funfaria?

 

2 ´só da muted no help ou em qualquer chat global?

 

 

1 - Poketibia eu acho que usa tfs 0.4 ou menor.

2 - Sim ele da muted em all chats.

  • Respostas 13
  • Visualizações 1.2k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

Postado

E ele pode ser configurado pra apenas muta o player no help?

 

Dei uma pequena fuçada no tfs e encontrei alguma funções pra fazer isso :

 

só trocar o mute.lua por esse :

function onSay(cid, words, param)

	local CHANNEL_HELP = 7
	local player = Player(cid)
	local storage = 456112

	if words == "/mute" then
		local mute = param:split(",")

		if mute[1] == nil or mute[1] == " " then
			player:sendCancelMessage("Invalid player specified.")
			return false
		end

		if mute[2] == nil or mute[2] == " " then
			player:sendCancelMessage("Invalid time specified.")
			return false
		end

		local target = Player(mute[1])
		local time = tonumber(mute[2])
		local condition = Condition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT)
		condition:setParameter(CONDITION_PARAM_SUBID, CHANNEL_HELP)
		condition:setParameter(CONDITION_PARAM_TICKS, time*60*1000)

		if player:getAccountType() < ACCOUNT_TYPE_TUTOR then
			return false
		end

		if target == nil then
			player:sendCancelMessage("A player with that name is not online.")
			return false
		end

		if target:getAccountType() >= ACCOUNT_TYPE_TUTOR then
			player:sendCancelMessage("Only player can be mutated")
			return false
		end

		target:addCondition(condition)
		sendChannelMessage(CHANNEL_HELP, TALKTYPE_CHANNEL_R1, target:getName() .. " has been muted by " .. player:getName() .. " for using Help Channel inappropriately.")
		target:setStorageValue(storage, 1)
		return false
	end

	if words == "/unmute" then

		local remove = Player(param)

		if player:getAccountType() < ACCOUNT_TYPE_TUTOR then
			return false
		end

		if remove == nil then
			player:sendCancelMessage("A player with that name is not online.")
			return false
		end

		if remove:getAccountType() >= ACCOUNT_TYPE_TUTOR then
			return false
		end

		if remove:getStorageValue(storage) == 1 then
			remove:removeCondition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT, CHANNEL_HELP)
			sendChannelMessage(CHANNEL_HELP, TALKTYPE_CHANNEL_R1, remove:getName() .. " has been unmuted by " .. player:getName() .. ".")
			remove:setStorageValue(storage, -1)
		else
			player:sendCancelMessage("A player " .. remove:getName() .. "is not mutated")
		end
	end

	return false
end

oZ_4WzviL.png

Postado

Dei uma pequena fuçada no tfs e encontrei alguma funções pra fazer isso :

 

só trocar o mute.lua por esse :

function onSay(cid, words, param)

	local CHANNEL_HELP = 7
	local player = Player(cid)
	local storage = 456112

	if words == "/mute" then
		local mute = param:split(",")

		if mute[1] == nil or mute[1] == " " then
			player:sendCancelMessage("Invalid player specified.")
			return false
		end

		if mute[2] == nil or mute[2] == " " then
			player:sendCancelMessage("Invalid time specified.")
			return false
		end

		local target = Player(mute[1])
		local time = tonumber(mute[2])
		local condition = Condition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT)
		condition:setParameter(CONDITION_PARAM_SUBID, CHANNEL_HELP)
		condition:setParameter(CONDITION_PARAM_TICKS, time*60*1000)

		if player:getAccountType() < ACCOUNT_TYPE_TUTOR then
			return false
		end

		if target == nil then
			player:sendCancelMessage("A player with that name is not online.")
			return false
		end

		if target:getAccountType() >= ACCOUNT_TYPE_TUTOR then
			player:sendCancelMessage("Only player can be mutated")
			return false
		end

		target:addCondition(condition)
		sendChannelMessage(CHANNEL_HELP, TALKTYPE_CHANNEL_R1, target:getName() .. " has been muted by " .. player:getName() .. " for using Help Channel inappropriately.")
		target:setStorageValue(storage, 1)
		return false
	end

	if words == "/unmute" then

		local remove = Player(param)

		if player:getAccountType() < ACCOUNT_TYPE_TUTOR then
			return false
		end

		if remove == nil then
			player:sendCancelMessage("A player with that name is not online.")
			return false
		end

		if remove:getAccountType() >= ACCOUNT_TYPE_TUTOR then
			return false
		end

		if remove:getStorageValue(storage) == 1 then
			remove:removeCondition(CONDITION_CHANNELMUTEDTICKS, CONDITIONID_DEFAULT, CHANNEL_HELP)
			sendChannelMessage(CHANNEL_HELP, TALKTYPE_CHANNEL_R1, remove:getName() .. " has been unmuted by " .. player:getName() .. ".")
			remove:setStorageValue(storage, -1)
		else
			player:sendCancelMessage("A player " .. remove:getName() .. "is not mutated")
		end
	end

	return false
end

oZ_4WzviL.png

funciona em versão tfs 1.1 é?

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