Skip to content

Commit

Permalink
play the sound & notification only if onRadio (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
TonybynMp4 authored Feb 7, 2024
1 parent df54e0b commit 0796df8
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,20 @@ local function connectToRadio(channel)
end

local function leaveradio()
qbx.playAudio({
audioName = 'End_Squelch',
audioRef = 'CB_RADIO_SFX',
source = cache.ped
})
if onRadio then
qbx.playAudio({
audioName = 'End_Squelch',
audioRef = 'CB_RADIO_SFX',
source = cache.ped
})
exports.qbx_core:Notify(locale('left_channel'), 'error')
end
radioChannel = 0
onRadio = false
exports['pma-voice']:setRadioChannel(0)
exports['pma-voice']:setVoiceProperty('radioEnabled', false)
exports.qbx_core:Notify(locale('left_channel'), 'error')
end


local function toggleRadio(toggle)
radioMenu = toggle
SetNuiFocus(radioMenu, radioMenu)
Expand Down

0 comments on commit 0796df8

Please sign in to comment.