• Ulx Playsounds help
    6 replies, posted
So I've looked on various forums and just about everywhere imaginable to try to solve this problem. I'm trying to play music in my TTT server so that everyone can hear and enjoy it. Things I need help with: -Where to put the music -The format of the music -What I need to type in the ulx menu to play the music
Place it in garrysmod/sound/music. Make the folder(s) is they don't already exist. It can be a .mp3, a .wav, and I think a .ogg. You also have to make sure the users download the sound file to hear it. To play it you would type this in console: [lua]ulx playsound /music/mysongname.mp3[/lua] You would change the ending if was a .wav or .ogg accordingly. Also the path to the sound is relative to the sound folder. You would not type ulx playsound /sound/whatever/ [editline]26th April 2014[/editline] In case you don't know how to force the users to download the sound this is how you would do it. 1. Let's say the song name was song1.mp3 and you put it in sound/music/. 2. Make a file called resource.lua and put it in lua/autorun/server/ 3. Inside of resource.lua type [lua]resource.AddFile( "sound/music/song1.mp3" )[/lua] 4. Then if you use fastball make sure you sync everything. Done!
resource.AddWorkshop( "228161323" ) resource.AddWorkshop( "159295451" ) resource.AddFile( "sound/music/20K.mp3" ) resource.AddFile( "sound/music/comeandgetit.mp3" ) resource.AddFile( "sound/music/Dark horse.mp3" ) resource.AddFile( "sound/music/Decisions.mp3" ) resource.AddFile( "sound/music/purgex.mp3" ) resource.AddFile( "sound/music/Rage valley.mp3" ) resource.AddFile( "sound/music/Self destruct.mp3" ) resource.AddFile( "sound/music/Under and over it.mp3" ) resource.AddFile( "sound/music/Wake me up.mp3" ) resource.AddFile( "sound/music/What you know.mp3" ) Does this look ok?
I don't know if it matters in Garry's Mod, but to steer clear of problems you should make sure you have no spaces in your file names, e.g. change Dark horse to Dark-horse
Spaces don't matter, and yes that is good.
Ok now it still says that The sound doesn't exist on the server. Althought the force downloading does work now. Thanks for that
On your pc go to steam/steamapps/common/Garrys Mod/garrysmod/download/sound/ and see if you can find your song. If you can't then the use didn't download it. Also ofc make sure it is installed on the server too but in sound/music/whatever
Sorry, you need to Log In to post a reply to this thread.