Garry's Mod

Garry's Mod

30 ratings
Play musics in GMod (By the power of the console)
By XmegaaAAa
Here, I'll teach u simply how to play literally musics from the game without any addons!!!

Eheh...
I'm not lying! If I lied, I wouldn't make this guide duh
Just by the power of the developer console!! :)

Let's go ahead.
   
Award
Favorite
Favorited
Unfavorite
Open console
I assume you already know how to do this, but I'll remind u anyway.

1) Open the game
2) In the main menu (Or pause menu) go to your settings
3) Get to the very bottom of the page (At the "Miscellaneous category"), and look for something called "Open developer console"
4) Bind a key of your choice for it (I recommend ` or ² or F1).
5) Then click on "Advanced" and "enable developer console".
6) Save everything
7) Try press your bound key, and the console should open (Even in the main menu).
Command to play music
I can add this to my previous guide about commands, but I prefer make a new one, 'cus I'll make a list of some musics you can play.
Note that it's the game musics, see for your custom musics in the last part of the guide.

Now open your console
Fun fact : You can run lua code in the console! That's what you're gonna use for playing the musics.
Type this "main part" of the command :

lua_run Entity(1):EmitSound(Sound("music/thenamehere.mp3"))
As you can see, it run a Lua command to play a music.
I made a list of all musics you can play in the next part.

Don't forget to replace the "thenamehere" by the music name in the list!
And ALSO if I state the music file format, it's because not all musics are in Mp3 format.


Music list
I made a lil selection of (cool?) musics you can play.
If you want the full list, use this addon.

WARNING : For some musics, you have to mount the related games to make them work!!!!
The generic and Hl2 musics can be played without the game mounted
Replace the "thenamehere" by the music name you want, as I stated before.

---------- Half Life: Source ----------
MP3

half-life01
half-life02
half-life03
half-life04
half-life05
half-life06 (What kind of music is that!?)
half-life07 (Suspens)
half-life08
half-life09
half-life10
half-life11
half-life12
half-life13 (You'll like this one)
half-life14
half-life15
half-life16
half-life17

---------- Generic musics (Hl1?) : ----------
MP3

hl1_song10
hl1_song11
hl1_song14
hl1_song15
hl1_song17
hl1_song19
hl1_song20
hl1_song21
hl1_song24
hl1_song25_remix3
hl1_song26
hl1_song3
hl1_song5
hl1_song6
hl1_song9

---------- Portal 2 : ----------
WAV

portal2_background01
portal2_background02
portal2_background03
portal2_background04
portal2_background05

sp_a1_wakeup_b1
sp_a1_wakeup_b2

sp_a2_core_b1
sp_a2_core_b2
sp_a2_core_b2p2
sp_a2_core_b3
sp_a2_core_b3p2
sp_a2_core_b3p3
sp_a2_core_b3p4

sp_a2_dual_lasers_r1
sp_a2_laser_vs_turret_r1

sp_a2_bridge_intro_lbout
sp_a2_bridge_the_gap_lbout
sp_a2_pull_the_rug_lbout

sp_a3_01_b2
sp_a3_03_b1
sp_a3_portal_intro_b1
sp_a3_portal_intro_b4_2

sp_a4_finale4_b2
sp_a4_finale4_b5
sp_a4_finale4_b8

sp_a4_tb_catch_b1a
sp_a4_tb_catch_c1b
sp_a4_tb_catch_c1c

sp_a4_tb_intro_tbin

sp_a4_intro_b0
sp_a4_intro_b1
sp_a4_intro_b2
sp_a4_intro_b3

sp_a4_tb_intro_b1
sp_a4_tb_trust_drop_b1
sp_a4_tb_wall_button_b1
sp_a4_tb_wall_button_d1

sp_factory_01_redemption_01
sp_intro_01_05_apple

sp_intro_01_06_chambertop
sp_intro_01_07_chamberinside
sp_intro_01_08_chamberexit

portal2_robots_ftw
portal2_want_you_gone


---------- Half-Life 2 : ----------
MP3

hl2_intro
hl2_song0

hl2_song1

hl2_song10
hl2_song11
hl2_song12_long
hl2_song13
hl2_song14
hl2_song15
hl2_song16
hl2_song17
hl2_song19
hl2_song2
hl2_song20_submix0
hl2_song20_submix4

hl2_song23_suitsong3
hl2_song25_teleporter

hl2_song26
hl2_song26_trainstation1
hl2_song27_trainstation2
hl2_song28
hl2_song29
hl2_song3
hl2_song30
hl2_song31
hl2_song32
hl2_song33
hl2_song4
hl2_song6
hl2_song7
hl2_song8

radio1
ravenholm_1

---------- Half-Life 2 Ep 1 : ----------
MP3

vlvx_song1
vlvx_song2

vlvx_song4

vlvx_song
vlvx_song11
vlvx_song12
vlvx_song18
vlvx_song19a
vlvx_song19b
vlvx_song21

---------- Half-Life 2 Ep 2 : ----------
MP3

vlvx_song3

vlvx_song0
vlvx_song15
vlvx_song20
vlvx_song22
vlvx_song23
vlvx_song23ambient
vlvx_song24
vlvx_song25
vlvx_song26
vlvx_song27
vlvx_song28
vlvx_song9

---------- Team Fortress 2 : ----------
WAV

cossack_sandvich
fortress_reel
fortress_reel_loop
fortress_reel_loop2

taunt_bongos
taunt_bongos_stop
trombonetauntv2

mvm_class_menu_bg
mvm_class_select
mvm_end_last_wave
mvm_end_mid_wave
mvm_end_tank_wave
mvm_end_wave
mvm_lost_wave
mvm_start_last_wave
mvm_start_mid_wave
mvm_start_tank_wave
mvm_start_wave

---------------------------------------------------------------

If somewhat the music isn't playing, try to change the format, like, if mp3 doesn't work u still can try the wav format.
Play your own musics
Yes, you can!

First, locate the "sound" folder in the garrysmod directory. (If there's not any sound folder, create one)
Then inside, create a new folder with a custom name (Without special characters, we never know) and then put your musics in there.
You own musics shouldn't have any special characters

Specials characters like accents, and stuff like ? ! : * / ; , § $
But, " - " are allowed like on the screen below.





...Don't try to override anything tho 'cus of the names.
Read before commenting.
Dude, it's not working!
Lua commands can be only run by the server host.
And this command is executed as the 1st player, hence Entity(1)

So, how to play the music on another player?
If you want to play the music on another player (Just for fun) replace the "1" by the number of the player.
You can easily find which player is Player2, Player3 etc by pressing tab.

I can listen to my custom songs, but the other players can't
It's normal people can't listen to your custom musics, 'cus only you have them.
You can try to upload an addon with your custom musics for people to have them too.

How to stop a music?
You may have tried the Portal musics, or just 'cus you want to stop it?
Use the stopsound command.
WARNING : It also stop sounds of all, ambient sounds, voices (idk) etc.

I want to play a music only for myself, and not for the others.
Yes, you can.
Instead of using lua_run, use lua_run_cl
If you know a lil bit how Lua in Gmod works, it run the command as "client", that means only for the one who's running the command.

Works in Singleplayer?
Yes. (Obviously)

Gimme a cool music to play when I want to celebrate my victory XD
Sure! x')
Bind this command then : (Make sure to mount TF2 tho)
act dance; lua_run Entity(1):EmitSound(Sound("music/fortress_reel.wav"))

Instructions unclear, destroyed my comput...
Get outta here, before I come tear appart your soul. I'm tired of this meme.
...Unless you say something honnestly kind. But yeah, I don't guarantee you anything.


You forgot this song :v (Song not related to the games)
I won't add any custom songs here, 'cus all is up to u.
I only add the INGAME MUSICS.

If you want me to add any game music here I missed, tell me in the comments.
30 Comments
adrianshepherd 22 Jan @ 7:18am 
Which is LG orbifold?
Boomeritaintaters 28 Mar, 2024 @ 6:13pm 
which one is sector sweep?
Habarich 9 Jan, 2024 @ 12:00pm 
maybe im stupid, but i dont get it how to bind this to a key because standart "bind (random button)" is not working with this script even though it works by itself
Smahpah 5 Jan, 2024 @ 1:51pm 
also how dare you say such a thing about jungle drums aka the song that plays when your getting chased by a giant testicle crab
Smahpah 5 Jan, 2024 @ 1:44pm 
time to dance to hard technology rock without having to use spotify
Boomeritaintaters 27 Dec, 2023 @ 3:09pm 
Insturctions unclear.... it was too good my balls imploded.....
ch33z3 1 Dec, 2023 @ 12:33pm 
:p2orange:where are the portal 1 tracks
:p2blue:i want to play 4000 degrees kelvin etc
XmegaaAAa  [author] 6 May, 2023 @ 7:22am 
Are you typing the command correctly? Make sure there is no typos, and if you don't bind it on an already used key that could be essential (Such as WASD or any keys from the settings)
Krl 31 Aug, 2020 @ 2:09pm 
for some reason I can't bind the command that plays the music
XmegaaAAa  [author] 15 Nov, 2019 @ 9:54am 
It's client side if you add "_cl" to the command.
Lile this : lua_run_cl