Most Garry's Mod servers don't feature any type of in-game music player. The wealth of addons available for server owners and players don't include many designed for playing music, but there are a few hidden gems you can take advantage of. You can select from several different solutions, depending on the level of access available to the server as well as the amount of effort you're willing to expend. Adding music can be a great way to stimulate creativity and bring people even closer together on your server.
Download and install Half-Life DJ (HLDJ). HLDJ is used for playing music over the in-game voice communication system. HLDJ plays WAV files at 11025Hz frequency, a 16-bit sampling rate and mono-channel mode; HLDJ comes with a built-in audio converter. The first time HLDJ is run, it will prompt you to run set-up. Set-up will automatically detect Garry's Mod, and allow you to set both the in-game "Play" key and the directory that contains your music. Once in-game, enter the command "LA" in the console to list audio. Load a song by entering the corresponding number, then press the key you designated as "Play." This will broadcast your music across the server.
Download PlayX, and copy it to the "Add-ons" folder typically found under "C:\Steam\steamapps\username\garrysmod\garrysmod." Once in-game, press "Q" and click on the "Entities" tab, then click on the "PlayX Player" icon to spawn the music player. To control the playback, hold "Q," go the "Options" tab and find the "Administrate" listing under "PlayX." This box will let you put in URLs from popular video sites and PlayX will play the audio from them. This means not having to convert your own songs, but you will have to find online versions of whatever you want to play. Other players can change the volume, hide and show the player, and disable it entirely though the "Settings" listing, found just under "Administrate."
Download WolfDJ and look inside the folder. There are two subfolders, "lua_code" and "web_code." Look in the "lua_code" folder; there is another subfolder called "wolfdj." Copy "wolfdj" and paste it in the "Add-ons" folder, typically found under "C:\Steam\steamapps\username\garrysmod\garrysmod." Close those windows and navigate to the "web_code" folder. The contents of that must be uploaded to a publicly accessible Web server. Copy the URL of the "songlist.php" file you just uploaded, and visit it in your Web browser to upload songs. It will require that you log in; the default username is "Admin" and the password is "wolfdj." Navigate back to the "addons\wolfdj" folder and open cl_config.lua in Notepad. Replace the default URLs for "Stream.Repository" and "Stream.Player" to match what you copied earlier. Launch Garry's Mod and press "F7" to open the window which controls playback.
Things you need
- Administrator access to a Gmod Server