Garry's Mod

Garry's Mod

PlaySound Improved
ƝiƵ 18. apr. 2022 kl. 10.23
Custom sounds
How do i add my own music
< >
Viser 115 av 20 kommentarer
Støng  [utvikler] 27. apr. 2022 kl. 6.29 
First, get your music tracks that you wanted to play, then make a new TXT file and rename it to "play_music_<soundtracknamehere>.lua".

Once you're done with that, open the LUA file with an editor of your choice, I recommend Notepad++[notepad-plus-plus.org]. After that, copy and paste this into your LUA file.

-- Setup menu parameters local function PlayMusicMenu(panel) local params = {} params.Text = "Stop all Music" params.Command = "playsound stop" panel:AddControl("Button",params) params.Text = "---------------- [<Soundtrack Name Here>] ----------------" panel:AddControl("Label",params) params.Text = "Tracks" panel:AddControl("Label",params) params.Text = "<Music Name Here>" params.Command = "playsound music/<filenamehere>.mp3" panel:AddControl("Button",params) params.Text = "---------------------------------------------------------------" panel:AddControl("Label",params) params.Text = "Stop all Music" params.Command = "playsound stop" panel:AddControl("Button",params) end -- Create the menu itself local function NewMenu() spawnmenu.AddToolMenuOption( "Options", "Music", "<Soundtrack Name Here> Music Menu", "<Soundtrack Name Here>", "", "", PlayMusicMenu ) end hook.Add( "PopulateToolMenu", "PlayMusicMenu_<Soundtrack Name's Shortform>", NewMenu )

Change the angled brackets with the name of the soundtrack and you probably know the rest...

If you're done with adding the tracks, you need to make sure these files including the LUA file are in their correct file paths otherwise it will not work.

<Your Folder>/lua/autorun/client/play_music_<soundtracknamehere>.lua <Your Folder>/sound/music/<filenamehere>.mp3

Then, put it in your addons folder and it should probably work now.

If this is too complicated for you then I apologize (I'm not good at explaining things).
Or you can follow my other guide which is quite simple.
Sist redigert av Støng; 11. des. 2024 kl. 21.01
heavyfortress0195 20. aug. 2022 kl. 6.54 
What do you mean by "put it in your addons folder"? What do i put in? It doesnt work.
Støng  [utvikler] 20. aug. 2022 kl. 7.23 
Opprinnelig skrevet av super brain:
What do you mean by "put it in your addons folder"? What do i put in? It doesnt work.
It's your Garry's Mod addons folder, located in
(Steam\steamapps\common\GarrysMod\garrysmod).

Like I said before, I will eventually update this addon and include the tracks y'all wanted the most. Please just be patient.
Sist redigert av Støng; 11. des. 2024 kl. 21.01
heavyfortress0195 20. aug. 2022 kl. 7.29 
I know but i want it as soon as possible so i am trying to make my own while you work on it. Also i know its my gmod addons folder. But WHAT do i put there in? What do i put inside the addons folder? Lua? Txt?
av.a. 20. aug. 2022 kl. 7.59 
Stong already stated this but these are the folders you need to make.[imgur.com]

I assume you know what to do now, so follow his tutorial.
heavyfortress0195 20. aug. 2022 kl. 8.52 
Opprinnelig skrevet av Frostbite:
Stong already stated this but these are the folders you need to make.[imgur.com]

I assume you know what to do now, so follow his tutorial.
I thought i did when i made a foldier with lua, and all the stuff with the sounds.

When i put it all together like it said, put it in the addons and then i tried.

t h e r e was not any option for Portal 2 Action 1 that i have made.

How do i fix it now? Can you make an video?
heavyfortress0195 20. aug. 2022 kl. 9.32 
Opprinnelig skrevet av Frostbite:
Stong already stated this but these are the folders you need to make.[imgur.com]

I assume you know what to do now, so follow his tutorial.
Please answer!
heavyfortress0195 20. aug. 2022 kl. 10.19 
Opprinnelig skrevet av Stong:
Opprinnelig skrevet av super brain:
What do you mean by "put it in your addons folder"? What do i put in? It doesnt work.
Foolishness... It's your Garry's Mod addons folder, located in
(Steam\steamapps\common\GarrysMod\garrysmod).

Like I said before, I will eventually update this addon and include the tracks y'all wanted the most. Please just be patient.
I am patient, but is it possible if you please make an video how to make ur own soundtracks? PLEASE i really need help beacause mine doesnt show up on the MUSIC'S list on garry's mod.
Støng  [utvikler] 20. aug. 2022 kl. 10.39 
Opprinnelig skrevet av super brain:
I am patient, but is it possible if you please make an video how to make ur own soundtracks? PLEASE i really need help beacause mine doesnt show up on the MUSIC'S list on garry's mod.
Buddy, we don't have that much time to explain it all to you. If you're really desperate to get it to work, just try this simple method.
heavyfortress0195 20. aug. 2022 kl. 11.00 
Like i said, it doesnt work and it said something about sample rate 4800.
heavyfortress0195 20. aug. 2022 kl. 11.05 
Opprinnelig skrevet av Stong:
Opprinnelig skrevet av super brain:
I am patient, but is it possible if you please make an video how to make ur own soundtracks? PLEASE i really need help beacause mine doesnt show up on the MUSIC'S list on garry's mod.
Buddy, we don't have that much time to explain it all to you. If you're really desperate to get it to work, just try this simple method.
Im just gonna make another discussion hoping someone else can help, so i dont need to bother you anymore. But uhm yeah, im desperate for it bescause i have been searching 6 days for portal 2 musics.
av.a. 20. aug. 2022 kl. 11.31 
Opprinnelig skrevet av super brain:
Like i said, it doesnt work and it said something about sample rate 4800.

You need to change the sample rate into 44100 hertz. I recommend using Audacity.
Sist redigert av av.a.; 20. aug. 2022 kl. 11.33
heavyfortress0195 20. aug. 2022 kl. 11.35 
Opprinnelig skrevet av Frostbite:
Opprinnelig skrevet av super brain:
Like i said, it doesnt work and it said something about sample rate 4800.

You need to change the sample rate into 44100 hertz. I recommend using Audacity.
I would rarely use it anyway, since i need quick switching since im only gonna use action music usually.
heavyfortress0195 28. sep. 2022 kl. 3.32 
Opprinnelig skrevet av Stong:
First, get your music tracks that you wanted to play, then make a new TXT file and rename it to "play_music_<soundtracknamehere>.lua".

Once you're done with that, open the LUA file with an editor of your choice, I recommend Notepad++[notepad-plus-plus.org]. After that, copy and paste this into your LUA file.

// Setup menu parameters local function PlayMusicMenu_D2K(Panel) local params = {} params.Text = "Stop all Music" params.Command = "playsound stop" Panel:AddControl("Button",params) params.Text = "---------------- [<Soundtrack Name Here>] ----------------" Panel:AddControl("Label",params) params.Text = "Tracks" Panel:AddControl("Label",params) params.Text = "<Music Name Here>" params.Command = "playsound music/<filenamehere>.mp3" Panel:AddControl("Button",params) params.Text = "---------------------------------------------------------------" Panel:AddControl("Label",params) params.Text = "Stop all Music" params.Command = "playsound stop" Panel:AddControl("Button",params) end // Create the menu itself local function NewMenu_D2K() spawnmenu.AddToolMenuOption( "Options", "Music", "<Soundtrack Name Here> Music Menu", "<Soundtrack Name Here>", "", "", PlayMusicMenu_D2K ) end hook.Add( "PopulateToolMenu", "PlayMusicMenu_<Soundtrack Name's Shortform>", NewMenu_D2K )

Change the angled brackets with the name of the soundtrack and you probably know the rest...

If you're done with adding the tracks, you need to make sure these files including the LUA file are in their correct file paths otherwise it will not work.

<Your Folder>/lua/autorun/client/play_music_<soundtracknamehere>.lua <Your Folder>/sound/music/<filenamehere>.mp3

Then, put it in your addons folder and it should probably work now.

If this is too complicated for you then I apologize (I'm not good at explaining things).
Or you can follow my other guide which is quite simple.
After waiting for a very long time, theres no sound tracks added yet. I dont know whats the problem and i would like to know how to actually do it.

I H A V E done all the instructions you said, i changed some stuff on the lua files, put correct file paths in the folder, and put it in the addons file.

However, it does look like it does not work.
The problem: Theres no menu for "Portal 2 Action".
I am desperate for this. I couldnt find anything else, and people refuse to do it.
Please, your my only chance..
Versus 24. jan. 2023 kl. 7.29 
Maybe you need the base addon for it to work..? :/
< >
Viser 115 av 20 kommentarer
Per side: 1530 50