• Play audio file to players from addon
    2 replies, posted
Hello, I'm trying to play audio files to players, however the issue that I am having is that the audio file is downloaded, and saved in the same folder as my addon. This can occur at any time when the server is running. Does the audio file need to be: A) Placed in a certain directory to play the file B) Downloaded to all of the clients, or will the server do that for me C) A certain file type to play Thanks Edit: I found [url]http://wiki.garrysmod.com/page/sound/Play[/url] which will play an audio file, however since this is both a server-side and client-side compatible function, would calling it server-side play the sound for everyone? If so, would they need to file downloaded on their computer?
1.) If your scripting the code, you define the location of what is being played. If it is the addon, you can have it play the audio from your addon folder. 2.) Yes, you will either need to create a workshop or use fast download, if your going FastDL then you need to make sure that the folders are recursive much like how your server is. 3.) I believe they need to be .wav files. (I am unsure on this) For your Edit question: Yes, if it isn't a audio file from Gmod/hl2 ect. then yes.
Thanks!
Sorry, you need to Log In to post a reply to this thread.