Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
hopefully fix radios
Browse files Browse the repository at this point in the history
  • Loading branch information
FrazzIe committed Sep 3, 2020
1 parent 99f1633 commit 4c720fa
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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,
Expand Down

0 comments on commit 4c720fa

Please sign in to comment.