v10networkscom / saltychat-fivem

FiveM implementation of Salty Chat (TeamSpeak 3 based Voice Plugin)
https://gaming.v10networks.com
GNU General Public License v3.0
70 stars 64 forks source link

Issue with Radio Speaker (3 clients testing, 3 Extensive Debug logs included) #99

Open xPiwel opened 2 years ago

xPiwel commented 2 years ago

Issue description:

Since the update to whisper mode of SaltyChat, Radio Speaker doesn't work anymore. exports.saltychat:GetRadioSpeaker() returns true client side so the speaker is enabled correctly.

Was the functionality working as excepted before the update:

Yes, when this feature came out, we debugged it together and it was working fine since then.

Server informations:

SaltyChat on latest github pushs. Ubuntu 18.04 (also tested on a Windows 10 hosting a server)

Client logs (Extensive Debug) and informations:

Client A version: 3.0.5 Client B version: 3.0.5 Client C version: 3.0.5

Client A and Client B connected to a radio channel. They can hear eachother perfectly when sending on radio. Client C wasn't on any radio channel.

Client A turned on the radio speaker with Client C next to him. Client B started talking, client C couldn't hear Client B but Client A hear him well just like a normal behaviour. Logs of Client A: ts3client_2021-11-13__01_08_37.415250.log

Client C got closer to Client B who turned on his Speaker from the time Client C got close to him. Client A and B could hear eachother, but Client C couldn't hear Client A from the speaker. Logs of Client B: ts3client_2021-11-13__01_09_00.798856.log

Finally, logs of client C (the one who doesn't hear the radio speaker from Client A or B): ts3client_2021-11-13__01_09_08.022880.log

Excepted Behaviour:

Radio speaker working when turned on.

_Code of the script that puts on the radio speaker when user press Y key while Radio NUI is on__*

SERVER SIDE : RegisterServerEvent("radio:setRadioSpeaker") AddEventHandler("radio:setRadioSpeaker",function(getPlayerRadioSpeaker) local _source = source exports.saltychat:SetPlayerRadioSpeaker(_source, getPlayerRadioSpeaker) TriggerClientEvent('Core:ShowNotification', _source, "Tu as "..(getPlayerRadioSpeaker and "~g~mis ~w~ta radio sur ~y~haut-parleur~w~." or "~r~enlever ~w~ta radio du monde ~y~haut-parleur~w~.").."") end)

CLIENT SIDE: function Radio:Speaker() local getPlayerRadioSpeaker = exports.saltychat:GetRadioSpeaker() getPlayerRadioSpeaker = not getPlayerRadioSpeaker TriggerServerEvent("radio:setRadioSpeaker", getPlayerRadioSpeaker) end (also tested on client side to add the client export of saltychat: exports.saltychat:SetRadioSpeaker(), but still the same issue).

(PS: Phone speaker isn't working as well, got no Extensive Debug logs of this but everything was tested on a safe environement. But that's not really important for me at the moment).

Thanks for your work ! :)

BlackFlash5 commented 2 years ago

It's a regression from the initial 3.x.x update. Since the player talking on the radio/phone has to know who the whisper targets are, the server would have to calculate a list of players hearing the traffic through a relay. So currently it's expected to not work and will be worked on if i have some time.

xPiwel commented 2 years ago

It's a regression from the initial 3.x.x update.

Since the player talking on the radio/phone has to know who the whisper targets are, the server would have to calculate a list of players hearing the traffic through a relay.

So currently it's expected to not work and will be worked on if i have some time.

Alright ! It's fine, take your time.

Thanks again for your work 🙏

xPiwel commented 2 years ago

Hello, getting in touch for a quick update. Do you have any ETA on that ? It was a really cool functionality! Missing it :D

Thanks! :)