Garry's Mod

Garry's Mod

PlaySound Improved
ƝiƵ 18 Apr 2022 @ 10:23am
Custom sounds
How do i add my own music
< >
Menampilkan 1-15 dari 20 komentar
Støng  [pengembang] 27 Apr 2022 @ 6:29am 
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.
Terakhir diedit oleh Støng; 11 Des 2024 @ 9:01pm
What do you mean by "put it in your addons folder"? What do i put in? It doesnt work.
Støng  [pengembang] 20 Agu 2022 @ 7:23am 
Diposting pertama kali oleh 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.
Terakhir diedit oleh Støng; 11 Des 2024 @ 9:01pm
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 Agu 2022 @ 7:59am 
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.
Diposting pertama kali oleh 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?
Diposting pertama kali oleh 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!
Diposting pertama kali oleh Stong:
Diposting pertama kali oleh 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  [pengembang] 20 Agu 2022 @ 10:39am 
Diposting pertama kali oleh 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.
Like i said, it doesnt work and it said something about sample rate 4800.
Diposting pertama kali oleh Stong:
Diposting pertama kali oleh 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 Agu 2022 @ 11:31am 
Diposting pertama kali oleh 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.
Terakhir diedit oleh av.a.; 20 Agu 2022 @ 11:33am
Diposting pertama kali oleh Frostbite:
Diposting pertama kali oleh 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.
Diposting pertama kali oleh 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 @ 7:29am 
Maybe you need the base addon for it to work..? :/
< >
Menampilkan 1-15 dari 20 komentar
Per halaman: 1530 50