Jump to content

Como aumentar o volume do voice no servidor?


Recommended Posts

Ativei o voice, mas o volume está extremamente baixo se comparado com outros servidores, olhei no script do voice, mas não faço ideia de como aumentar o volume.
ATENÇÃO o problema não é eu ir nas configurações do MTA e aumentar o som, todos que entraram no meu servidor reclamaram que o voice está muito baixo, e como eu disse, quando eu entro em outros servidores está extremamente alto, comparado com o do meu servidor.

Se alguém sabe alguma forma para que eu possa aumentar o volume do voice, por favor me ajude. ?

Link to comment

Consegui, era só parar de ser burro e ler a wiki, usei o setSoundVolume

            local volume = setPlayerVoiceBroadcastTo ( v, playersInChannel )
            setSoundVolume (volume, 1)

Não sei como fecha tópico mas se algum moderador ver pode fechar.

Link to comment
35 minutes ago, Lord Henry said:

Huahauahauahua, direto me dá vontade de dizer isso mas seria grosseria da minha parte.

Eu tinha tentado isso antes de abrir o tópico, só que coloquei (volume, 2 ) já que 1 era 100% e tipo 0.5 era 50%,  então pensei putz se eu colocar 2 vai ficar 200% perfeito kkkkkkkkk, mas não funfo, achei que o setSoundVolume não funcionava com setPlayerVoiceBroadcastTo

Link to comment
  • Moderators
1 hour ago, MaligNos said:

Sem contar que pela wiki setPlayerVoiceBroadcastTo não retorna um elemento som (para que possa alterar seu volume), e sim um booleano. :lol:

Verdade, não tinha notado isso também, então mesmo se fosse funções do mesmo lado não funcionaria. Fora que essa função é para definir o(s) jogador(es) que pode ouvir o outro.

Link to comment

Então como raios funcionou ? kkkkkk agora fiquei pensativo.
 

if isVoiceEnabled() then
	addEventHandler ( "onPlayerQuit", root, 
		function()
			local previousChannel = playerChannels[source]
			--Remove them from any previous channels
			if tonumber(previousChannel) then
				channels[previousChannel][source] = nil
				--Delete the empty table if he was the last player
				if not next(channels[previousChannel]) then
					channels[previousChannel] = nil
				end
			end
			playerChannels[source] = nil
		end
	)

	function getPlayerChannel ( player )
		if not checkValidPlayer ( player ) then return false end
		return playerChannels[player]
	end

	function setPlayerChannel ( player, id )
		if not checkValidPlayer ( player ) then return false end
		id = tonumber(id)
		if not id then
			return setPlayerDefaultChannel ( player )
		end
		local previousChannel = playerChannels[player]
		--Remove them from any previous channels
		if tonumber(previousChannel) then
			channels[previousChannel][player] = nil
			--Delete the empty table if he was the last player
			if not next(channels[previousChannel]) then
				channels[previousChannel] = nil
			end
		end
		playerChannels[player] = id
		--Insert them into the new channel
		channels[id] = channels[id] or {}
		channels[id][player] = true
		--Update all players in this channel of the new player in this channel
		playersInChannel = getPlayersInChannel ( id )
		for i,v in ipairs(playersInChannel) do
			local volume = setPlayerVoiceBroadcastTo ( v, playersInChannel )
			setSoundVolume (volume, 1)
		end
		return true
	end

	function getPlayersInChannel ( id )
		if not isElement(id) then
			id = tonumber(id)
			if not id then
				outputDebugString ( "getPlayersInChannel: Bad 'id' argument", 2 )
				return false
			end
		end
		return tableToArray(channels[id] or {})
	end

	function getNextEmptyChannel()
		local emptyChannel = 1
		while channels[emptyChannel] do
			emptyChannel = emptyChannel + 1
		end
		return emptyChannel
	end

else
	getPlayerChannel = outputVoiceNotLoaded
	setPlayerChannel = outputVoiceNotLoaded
	getPlayersInChannel = outputVoiceNotLoaded
	getNextEmptyChannel = outputVoiceNotLoaded
end

 

Link to comment
  • Moderators

Se funcionou só pode ter sido por outro motivo que você arrumou. Sobre o código, não vai funcionar pelos motivos que a gente já falou aqui e se você usar o comando /debugscript 3 certamente vai encontrar algum erro nessa linha.

Link to comment
  • 1 year later...
On 10/01/2019 at 13:58, asrzkj said:

Talvez aumentando a qualidade. Verifique os parâmetros do voice dentro do arquivo mtaserver.conf.

Os parâmetros padrões são esses: https://wiki.multitheftauto.com/wiki/Server_mtaserver.conf#voice

 

 

On 10/01/2019 at 13:51, Gaimo said:

Ativei o voice, mas o volume está extremamente baixo se comparado com outros servidores, olhei no script do voice, mas não faço ideia de como aumentar o volume.
ATENÇÃO o problema não é eu ir nas configurações do MTA e aumentar o som, todos que entraram no meu servidor reclamaram que o voice está muito baixo, e como eu disse, quando eu entro em outros servidores está extremamente alto, comparado com o do meu servidor.

Se alguém sabe alguma forma para que eu possa aumentar o volume do voice, por favor me ajude. ?

Estou com esse mesmo problema li esse tópico umas 3 vezes mais não entendi alguém poderia me explicar passo a passo como faria pra aumentar ?

 

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...