Ulysses
Ulysses Stuff => General Chat & Help and Support => Topic started by: Charlie on July 19, 2020, 09:03:11 PM
-
Hello, I am having issues with trying to get the ulx playsound command to work. I've looked at other threads and posts regarding this issue any I still haven't got it to work.
So, I have a sound file "loose.mp3" and have placed it in garrysmod/sound/fun/loose.mp3 .
I've added the resource.AddFile("/sound/fun/loose.mp3")
line into garrysmod/autorun/workshop.lua
I'm really not sure what I am doing wrong here, any help will be appreciated.
Thanks!
-----
My ULib/ULX versions are:
ULib v2.63w
ULX v3.73w
Game mode(s) I am having this problem on: Sandbox
What appears in the console:
] ulx playsound fun/loose.mp3
[LC ULib ERROR] Received invalid sound
-
Remove the slash before "sound".
resource.AddFile("sound/fun/loose.mp3")
This line goes in garrysmod/lua/autorun/server/workshop.lua
-
Hello, I have tried all the things you have suggested but I am still getting the same error
-
Interesting. The error implies that the sound file is still not being sent to you.
Make sure your game client downloads custom content. In the game menu: click "Options", click the "Multiplayer" tab, select "Allow all custom files from server" from the dropdown.
(https://timmy.github.io/images/garrysmod-options-multiplayer.png)
ULX also provides an alternative method to add files for download:
- Shut down your server.
- Open <garrysmod>/data/ulx/downloads.txt with Notepad or a code editor.
- Add sound/fun/loose.mp3 on a new line.
- Save the file.
- Restart your server.