AvarianKnight / pma-voice

An easy drag n' drop resource that gives you a wrapper to use FiveM's built-in mumble voice.
MIT License
225 stars 191 forks source link

Problem With Radio Sound #142

Closed davidmood closed 3 years ago

davidmood commented 3 years ago

https://github.com/AvarianKnight/pma-voice/blob/3efc6ac001209004c3773e8e8068775aa3e2a707/client/main.lua#L165

This if is not necessary, but if the idea was to handle receiving a wrong variable, it is always going back and forth, it never makes the sound.

davidmood commented 3 years ago

It takes a boolean and treats it as a string

AvarianKnight commented 3 years ago

Not sure what you mean, nor do I think you looked through the code to see what the micClicks variable actually is, micClicks is stored as a Resource KVP string, when a user disables micClicks via radios this will get set to 'false'. The reason its a string instead of an actual boolean is because there's no way to save a boolean to a KVP.

https://github.com/AvarianKnight/pma-voice/blob/3efc6ac001209004c3773e8e8068775aa3e2a707/client/main.lua#L410-L415