playsound help

so as a newbie to lua I was trying to add my own music to this addon’s menu.

But i can’t figure out how. the addon seems to be playing the mp3’s from a nonexistant music folder. Any help (or better yet a tutorial) would be greatly appreciated.

i have no idea

That addon plays music from hl2 and hl, Its built in the source engine

How would you do it then?

Well, if you want to make a simple remake of that addon, just change pieces it the code.

Like this piece
local params = {}
params.Text = “Half-Life 1 - ‘‘Black Mesa Inbound’’”
params.Description = “[Atmosphere]”
params.Command = “playsound music/HL1_song3.mp3”
Panel:AddControl( “Button”,params)

and then just change the directory to sound you want to play, and rename it, for example.
local params = {}
params.Text = “RAVEBREAK!” – Changing Title
params.Description = “LETS RAVEBREAK!” – Changing Description
params.Command = “playsound ravebreak.mp3” – Changing Sounddirectory
Panel:AddControl( “Button”,params)

Remember: If you’re editing a existing addon. Be sure to give credit.

Pretty much like Dragge said, note that you can copy these blocks to add new ones. The base path for the sounds will be the garrysmod/sound/ folder.

Ye, so if you got like “garrysmod/sound/MyMusic/music1.mp3”
the directory of the file would be “MyMusic/music1.mp3”.
Because it loads from the “sound/” folder.

Thank you so much Dragge, it works :love:

No Problemo