Ulysses

Ulysses Stuff => General Chat & Help and Support => Topic started by: Charlie on July 19, 2020, 09:03:11 PM

Title: Help needed with ulx playsound
Post 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
Code: [Select]
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:
Code: [Select]
] ulx playsound fun/loose.mp3
[LC ULib ERROR] Received invalid sound
Title: Re: Help needed with ulx playsound
Post by: Timmy on July 20, 2020, 11:21:14 AM
Remove the slash before "sound".

Code: [Select]
resource.AddFile("sound/fun/loose.mp3")
This line goes in garrysmod/lua/autorun/server/workshop.lua
Title: Re: Help needed with ulx playsound
Post by: Charlie on July 20, 2020, 04:36:49 PM
Hello, I have tried all the things you have suggested but I am still getting the same error
Title: Re: Help needed with ulx playsound
Post by: Timmy on July 22, 2020, 11:44:50 AM
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: