@@ -120,6 +120,7 @@ RegisterCommand('+cycleproximity', function()
120120 voiceMode = (newMode <= # Cfg .voiceModes and newMode ) or 1
121121 MumbleSetAudioInputDistance (Cfg .voiceModes [voiceMode ][1 ] + 0.0 )
122122 mode = voiceMode
123+ LocalPlayer .state :set (' proximity' , Cfg .voiceModes [voiceMode ][1 ], true )
123124 -- make sure we update the UI to the latest voice mode
124125 SendNUIMessage ({
125126 voiceMode = voiceMode - 1
@@ -133,8 +134,10 @@ RegisterKeyMapping('+cycleproximity', 'Cycle Proximity', 'keyboard', GetConvar('
133134RegisterNetEvent (' pma-voice:mutePlayer' , function ()
134135 playerMuted = not playerMuted
135136 if playerMuted then
137+ LocalPlayer .state :set (' proximity' , 0.1 , true )
136138 MumbleSetAudioInputDistance (0.1 )
137139 else
140+ LocalPlayer .state :set (' proximity' , Cfg .voiceModes [mode ][1 ], true )
138141 MumbleSetAudioInputDistance (Cfg .voiceModes [mode ][1 ])
139142 end
140143end )
@@ -273,6 +276,7 @@ AddEventHandler('onClientResourceStart', function(resource)
273276
274277 -- sets how far the player can talk
275278 MumbleSetAudioInputDistance (Cfg .voiceModes [mode ][1 ] + 0.0 )
279+ LocalPlayer .state :set (' proximity' , Cfg .voiceModes [mode ][1 ] + 0.0 , true )
276280
277281 -- this sets how far the player can hear.
278282 MumbleSetAudioOutputDistance (Cfg .voiceModes [# Cfg .voiceModes ][1 ] + 0.0 )
0 commit comments