From 4c720faf80045690fa419c3c438d98b114698235 Mon Sep 17 00:00:00 2001 From: Fraser Watt <28698343+FrazzIe@users.noreply.github.com> Date: Thu, 3 Sep 2020 01:11:22 +0100 Subject: [PATCH] hopefully fix radios --- client.lua | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/client.lua b/client.lua index ae221bc..7829658 100644 --- a/client.lua +++ b/client.lua @@ -70,9 +70,8 @@ function SetGridTargets(pos, reset) -- Used to set the players voice targets dep end if reset then - MumbleClearVoiceTarget(voiceTarget) -- Reset voice target - MumbleSetVoiceTarget(voiceTarget) NetworkSetTalkerProximity(mumbleConfig.voiceModes[playerData.mode][1] + 0.0) -- Set voice proximity + MumbleClearVoiceTarget(voiceTarget) -- Reset voice target end if playerChunk ~= currentChunk or newGridTargets or reset then -- Only reset target channels if the current chunk or any nearby chunks have changed @@ -271,7 +270,7 @@ AddEventHandler("onClientResourceStart", function(resName) -- Initialises the sc DebugMsg("Initialising") - Citizen.Wait(2500) + Citizen.Wait(1000) if mumbleConfig.useExternalServer then MumbleSetServerAddress(mumbleConfig.externalAddress, mumbleConfig.externalPort) @@ -290,6 +289,13 @@ AddEventHandler("onClientResourceStart", function(resName) -- Initialises the sc SendNUIMessage({ warningId = "mumble_is_connected" }) end + Citizen.Wait(1000) + + MumbleClearVoiceTarget(voiceTarget) -- Reset voice target + MumbleSetVoiceTarget(voiceTarget) + + Citizen.Wait(1000) + voiceData[playerServerId] = { mode = 2, radio = 0,