I am going to start releasing some of my smaller scripts, and then possibly some of the bigger ones.
The first on my list of scripts to release is my InteractSound which I essentially use to play interaction sounds that are not included within GTA V’s sounds. For example, handcuff sound effects. Or, a warning tone for a server restart, etc.
This particular script will allow you to play any .ogg sound file on any single client, all clients, or only clients within the specified range of the player’s Ped for the player you pass it. I plan to extend the distance-related event to include the functionality of making the audio file play quieter the further you are away from the “source”. The resource really only provides events and an NUI interface that runs in the background to play the sounds.
As with 95% of the work I do, this script (among with others) is very well documented both with comments in the script and the documentation page which is linked below.
Let me know if you have questions! Reply here or find me on Discord. It’s the same name in both places.
This is a resource with events meant to be triggered from other scripts or your own key bindings. Basically the scaffolding to play alert tones/sound effects in your own scripts without relying on GTA V’s audio library.
This is great! I do have one problem though, I was testing the PlayOnSource, and after the sound was done, it make a click/beep noise and replayed it over and over. So my question is, is there anyway to end the sound once it’s finished or in the middle?
It should have no problem playing any size unless the CEF interface restricts it. I’m not aware of a restriction, though. So, the file completes and starts over? And you can confirm this? Or does the audio file itself have sounds that repeat in it? Because this script does not play a click/beep at any point. That has to be coming from your audio file.
The file did complete and start over. However, after checking it, I found that it does play a slight click at the very end of it. When I shortened the audio file to ~30s it works fine. So the only thing I can think of was that the file was too long or too large, but that’s on my end. Thanks for such a fast response! I appreciate the help.
Well to further advance my question - could you have a file with all the instances of vehicle names (provided by the game - ie: Maibatsu Penumbra {305}) along with the other 100+ vehicles, play a random lock / unlock sound provided in which group the car is in?