Tekken Posted February 11, 2015 Share Posted February 11, 2015 I have default voice chat from mta team, and anybody can hear it, but i want to be only local on 50 meters how i can do it ? Link to comment
SkatCh Posted February 11, 2015 Share Posted February 11, 2015 Maybe you can change dxDrawVoice distance to something like that local local_Voice_range = 50 then you can ad this if (getDistanceBetweenPoints3D(camX, camY, camZ, headX, headY, headZ)<= local_Voice_range) then -- Your code here Link to comment
Dealman Posted February 11, 2015 Share Posted February 11, 2015 I wouldn't bother, the voice resource needs significant updating. I once made a resource for it which let you create rooms, and only people within the rooms would hear one another. But the volume of that voice resource is so ridiculously quiet - it's practically of no use whatsoever. Unless they've fixed it since I brought it up Link to comment
Tekken Posted February 11, 2015 Author Share Posted February 11, 2015 I wouldn't bother, the voice resource needs significant updating.I once made a resource for it which let you create rooms, and only people within the rooms would hear one another. But the volume of that voice resource is so ridiculously quiet - it's practically of no use whatsoever. Unless they've fixed it since I brought it up Your resource is exactly wath i need.., you have ti now ? Link to comment
SkatCh Posted February 11, 2015 Share Posted February 11, 2015 Lol i already gave you the solution did u even try it . Link to comment
Tekken Posted February 11, 2015 Author Share Posted February 11, 2015 i tried like this: addEventHandler ( "onClientPlayerVoiceStart", root, function() local voice_range = 50 local distance = getDistanceBetweenPoints3D (camX, camY, camZ, headX, headY, headZ) if distance <= voice_range then voicePlayers[source] = true end end ) 1 Link to comment
Walid Posted February 11, 2015 Share Posted February 11, 2015 it's not correct simply because u didn't add camX , CamY , camY , headX, headY , headY more than that i think SkatCh got confused between Draw voice image and the voice. it can be like this: local voice_range = 50 addEventHandler ( "onClientPlayerVoiceStart", root, function() if (source and isElement(source) and getElementType(source) == "player") then local sX, sY, sZ = getElementPosition(localPlayer) local rX, rY, rZ = getElementPosition(source) local distance = getDistanceBetweenPoints3D(sX, sY, sZ, rX, rY, rZ) if distance <= voice_range then voicePlayers[source] = true end end end ) Link to comment
Tomas Posted February 11, 2015 Share Posted February 11, 2015 Try local voice_range = 50 addEventHandler ( "onClientPlayerVoiceStart", root, function() if (source and isElement(source) and getElementType(source) == "player") and localPlayer ~= source then local sX, sY, sZ = getElementPosition(localPlayer) local rX, rY, rZ = getElementPosition(source) local distance = getDistanceBetweenPoints3D(sX, sY, sZ, rX, rY, rZ) if distance <= voice_range then voicePlayers[source] = true end end end ) Link to comment
Tekken Posted February 11, 2015 Author Share Posted February 11, 2015 Now nowbody can hear me local range = 50 addEventHandler ( "onClientPlayerVoiceStart", root, function() if (source and isElement(source) and getElementType(source) == "player") and localPlayer ~= source then local sX, sY, sZ = getElementPosition(localPlayer) local rX, rY, rZ = getElementPosition(source) local distance = getDistanceBetweenPoints3D(sX, sY, sZ, rX, rY, rZ) if distance <= range then voicePlayers[source] = true else voicePlayers[source] = nil end end end ) Link to comment
Tekken Posted February 11, 2015 Author Share Posted February 11, 2015 Found it, thank you guys for the support local range = 50 addEventHandler ( "onClientPlayerVoiceStart", root, function() if (source and isElement(source) and getElementType(source) == "player") and localPlayer ~= source then local sX, sY, sZ = getElementPosition(localPlayer) local rX, rY, rZ = getElementPosition(source) local distance = getDistanceBetweenPoints3D(sX, sY, sZ, rX, rY, rZ) if distance <= range then voicePlayers[source] = true else cancelEvent()--This was the shit end end end ) Link to comment
UltraGaming Posted February 28, 2017 Share Posted February 28, 2017 Well I am trying this and now everyone can hear me every where I am even with the last reply. Link to comment
^iiEcoo'x_) Posted February 28, 2017 Share Posted February 28, 2017 11 hours ago, UltraGaming said: Well I am trying this and now everyone can hear me every where I am even with the last reply. Posted February 11, 2015 Link to comment
Syntrax# Posted March 1, 2017 Share Posted March 1, 2017 On 28-2-2017 at 04:36, UltraGaming said: Well I am trying this and now everyone can hear me every where I am even with the last reply. Did you put this client side? Link to comment
Investor Posted March 1, 2017 Share Posted March 1, 2017 If you want it very sophisticated, it won't be as easy as setting down the volume. My brother made a 3D-position-local VOIP which also calculates all sound pan from camera to source. It was a pain in the arse, so idk if he'll share it for free. Link to comment
Syntrax# Posted March 1, 2017 Share Posted March 1, 2017 I'll take a look on this cause i might use it within Dynasty Network to use this ingame For normal local chat and Group chat rooms Link to comment
Resmurf Posted July 22, 2017 Share Posted July 22, 2017 (edited) Have anyone got it working?, i'm highly interested in this resource. I found this https://community.multitheftauto.com/index.php?p=resources&s=details&id=14281 i will give it a try and let you guys know. Edited July 22, 2017 by Resmurf Link to comment
NeXuS™ Posted July 22, 2017 Share Posted July 22, 2017 @Resmurf, this is quite an old post, I don't think it's up to date. Link to comment
Resmurf Posted July 22, 2017 Share Posted July 22, 2017 I know it's old, but i'm trying to i mean they said they achieved it which i highly doubt because all the servers would be flooded with voice chats. Link to comment
Lorder Posted July 23, 2017 Share Posted July 23, 2017 10 hours ago, Resmurf said: I know it's old, but i'm trying to i mean they said they achieved it which i highly doubt because all the servers would be flooded with voice chats. local nearbyPlayers = {} addEventHandler("onPlayerVoiceStart", root, function() local r = 50 local posX, posY, posZ = getElementPosition(source) local chatSphere = createColSphere(posX, posY, posZ, r) 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 ) 1 Link to comment
eFFecT1 Posted January 28, 2019 Share Posted January 28, 2019 (edited) where do i add thoese codes? idk because im begginer in this and i'm trying to mage a good script from the old owl script Edited January 28, 2019 by eFFecT1 Link to comment
Peng Posted February 3, 2019 Share Posted February 3, 2019 On 23/07/2017 at 01:25, Resmurf said: Have anyone got it working?, i'm highly interested in this resource. I found this https://community.multitheftauto.com/index.php?p=resources&s=details&id=14281 i will give it a try and let you guys know. i doesn t work Link to comment
Mr.Solo Posted March 20, 2019 Share Posted March 20, 2019 (edited) has anyone found a way to make this, why can't MTA have a good Local Voice chat like in FiveM for roleplay purposes, Edited March 20, 2019 by Mr.Solo Link to comment
XaskeL Posted March 20, 2019 Share Posted March 20, 2019 (edited) del Edited March 20, 2019 by XaskeL Link to comment
Addlibs Posted March 20, 2019 Share Posted March 20, 2019 I've just released a 3D proximity based voice chat resource which I had sitting on my disk being unused. https://community.multitheftauto.com/index.php?p=resources&s=details&id=15958. Initially wanted to wait until MTA's voice system is updated to Opus and voice volumes are fixed as they're extremely quiet still. Link to comment
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