Gallagher Posted May 11, 2014 Posted May 11, 2014 Is there any resource voice Where? If I speak in the local voice chat "z" only players that are up to 20 feet away from me can you hear me? I tried using this but it does not work here. local nearbyPlayers = {} addEventHandler( 'onPlayerVoiceStart', root, function() local chatRadius = 20 local posX, posY, posZ = getElementPosition( source ) local chatSphere = createColSphere( posX, posY, posZ, chatRadius ) nearbyPlayers = getElementsWithinColShape( chatSphere, "player" ) destroyElement( chatSphere ) local empty = exports.voice:getNextEmptyChannel ( ) exports.voice:setPlayerChannel(source, empty) for index, player in ipairs (nearbyPlayers) do exports.voice:setPlayerChannel(player, empty) end end) addEventHandler("onPlayerVoiceStop",root, function() exports.voice:setPlayerChannel(source) for index, player in ipairs (nearbyPlayers) do exports.voice:setPlayerChannel(player) end nearbyPlayers = {} end)
Karuzo Posted May 12, 2014 Posted May 12, 2014 Try to use the function setSoundVolume--with the player element
Wisam Posted May 12, 2014 Posted May 12, 2014 Try to use the function setSoundVolume--with the player element I dont think he mean that, even if he change the volume.. all the players in the server can hear it ☣ Plauge Arma II DayZ Mod Server ☣ Here's the link to stay tuned with the server progress and features: https://forum.mtasa.com/viewtopic.php?f=114&t=96675 Get Ready to play DayZ like you never did before
Karuzo Posted May 12, 2014 Posted May 12, 2014 Oh yeah sure if he sets the volume to 0 he still can hear it? lol.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now