diff --git a/client/init/proximity.lua b/client/init/proximity.lua index 53ff176..c5b73ff 100644 --- a/client/init/proximity.lua +++ b/client/init/proximity.lua @@ -32,10 +32,10 @@ function addNearbyPlayers() MumbleAddVoiceChannelListen(playerServerId) MumbleAddVoiceTargetChannel(voiceTarget, playerServerId) - for source, _ in pairs(callData) do + for source, _ in pairs(callData) do if source ~= playerServerId then MumbleAddVoiceTargetChannel(voiceTarget, source) - end + end end diff --git a/client/module/phone.lua b/client/module/phone.lua index 50b1797..946342c 100644 --- a/client/module/phone.lua +++ b/client/module/phone.lua @@ -10,7 +10,8 @@ RegisterNetEvent('pma-voice:syncCallData', function(callTable, channel) end) RegisterNetEvent('pma-voice:addPlayerToCall', function(plySource) - callData[plySource] = true + toggleVoice(plySource, true, 'call') + callData[plySource] = true end) RegisterNetEvent('pma-voice:removePlayerFromCall', function(plySource)