Garry's Mod

Garry's Mod

PlaySound Improved
Custom sounds
How do i add my own music
< >
Zobrazeno 115 z 20 komentářů
Støng  [vývojář] 27. dub. 2022 v 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.
Naposledy upravil Støng; 11. pro. 2024 v 21.01
What do you mean by "put it in your addons folder"? What do i put in? It doesnt work.
Støng  [vývojář] 20. srp. 2022 v 7.23 
super brain původně napsal:
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.
Naposledy upravil Støng; 11. pro. 2024 v 21.01
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?
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.
Frostbite původně napsal:
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?
Frostbite původně napsal:
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!
Stong původně napsal:
super brain původně napsal:
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  [vývojář] 20. srp. 2022 v 10.39 
super brain původně napsal:
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.
Stong původně napsal:
super brain původně napsal:
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.
super brain původně napsal:
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.
Naposledy upravil av.a.; 20. srp. 2022 v 11.33
Frostbite původně napsal:
super brain původně napsal:
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.
Stong původně napsal:
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..
Maybe you need the base addon for it to work..? :/
< >
Zobrazeno 115 z 20 komentářů
Na stránku: 1530 50