Garry's Mod
PlaySound Improved
ƝiƵ 18 Thg04, 2022 @ 10:23am
Custom sounds
How do i add my own music
< >
Đang hiển thị 1-15 trong 20 bình luận
Støng  [nhà phát triển] 27 Thg04, 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.
Lần sửa cuối bởi Støng; 11 Thg12, 2024 @ 9:01pm
What do you mean by "put it in your addons folder"? What do i put in? It doesnt work.
Støng  [nhà phát triển] 20 Thg08, 2022 @ 7:23am 
Nguyên văn bởi 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.
Lần sửa cuối bởi Støng; 11 Thg12, 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 Thg08, 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.
Nguyên văn bởi 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?
Nguyên văn bởi 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 Thg08, 2022 @ 10:19am 
Nguyên văn bởi Stong:
Nguyên văn bởi 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  [nhà phát triển] 20 Thg08, 2022 @ 10:39am 
Nguyên văn bởi 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 Thg08, 2022 @ 11:00am 
Like i said, it doesnt work and it said something about sample rate 4800.
heavyfortress0195 20 Thg08, 2022 @ 11:05am 
Nguyên văn bởi Stong:
Nguyên văn bởi 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 Thg08, 2022 @ 11:31am 
Nguyên văn bởi 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.
Lần sửa cuối bởi av.a.; 20 Thg08, 2022 @ 11:33am
heavyfortress0195 20 Thg08, 2022 @ 11:35am 
Nguyên văn bởi Frostbite:
Nguyên văn bởi 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.
Nguyên văn bởi 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 Thg01, 2023 @ 7:29am 
Maybe you need the base addon for it to work..? :/
< >
Đang hiển thị 1-15 trong 20 bình luận
Mỗi trang: 1530 50