Garry's Mod
Оцінок: 624
Music player
   
Нагородити
До улюбленого
В улюблених
Прибрати
Content Type: Addon
Addon Type: Tool
Addon Tags: Fun, Scenic
Розмір файлу
Додано
Оновлено
17.819 KB
24 лип. 2014 о 12:29
19 груд. 2014 о 15:09
Змін 11 ( перегляд )

Підпишіться, аби завантажити
Music player

Опис
Before complaining about this not working/being broken read Issues&Solutions AND the comments!

THIS DOES NOT WORK WITH YOUTUBE!


A simple yet powerful and elegant music player which allows you to play your favorite music with the press of a button. The music player can be operated through a derma menu, chat commands or even console commands, meaning you can bind keys to control the player! The player has a simple and pretty design, even including an FFT equalizer.

The player has the functionality to play music from both URLs and local files on your computer! In addition, you can save your favorite playlists and they'll be loaded right away for the next use. There's a whole lot more commands to play around with.

Features
  • Easy to use
  • Pretty design & colors
  • FFT equalizer
  • Shuffling!
  • The ability to control the player through chat commands
  • Usable whereever clientside Lua is allowed!

The easiest way to operate the music player is through the derma menu. To access this, use the console command music_menu. To make it even easier, you can bind the command to a key by entering this in the console:

bind keyhere "music_menu"

Chat commands can be used to operate the player just as well as you can use console commands. All commands are prefixed with !musicplayer, followed by the command.

Example: !musicplayer start
This will start playing music.

Chat commands
start - Starts playing music.
stop - Stops playing music.
pause - Pauses the music.
unpause - Unpauses the music.
next - Plays the next song, or starts the playlist again if you're at the playlist's last song.
back - Plays the previous song, or starts the playlist again if you're at the playlist's first song.
toggleplaymode - Toggles the playmode between from URL and from file.
clearplaylist - Stops the music and clears the playlist.
saveplaylist - Saves the playlist (automatically loaded when the player initializes).
deleteplaylist - Deletes a saved playlist.
getplaymode - Adds a chat message saying the current playmode (URL/File).
add "name of song" link_or_path/to/song.mp3 - Adds a song to the playlist, it's important the song name is in quotes!
remove name of song - Removes a song from the playlist, it'll be gone by the next time the playlist starts.

Alternatively, you can use console commands. These are useful if you want to bind a music player control to a key.

Example: bind p "music_start"
This is ran in the console. Now, when p is pressed, the music will start playing!

Console commands
music_start
music_stop
music_togglepause
music_next
music_back
music_add
music_remove
music_clearplaylist
music_toggleplaymode
music_getplaymode
music_saveplaylist
music_deleteplaylist
music_showplaylist

Issues&Solutions

I can't make the player appear or anything, it doesn't work at all!
- Chances are the server you play on (if you do) doesn't allow clientside Lua, therefore the player doesn't load. Try using it in Sandbox and you'll see it works. If it still doesn't work, read the description of the addon once more to see if you didn't misunderstand or miss anything, then make a comment.

But I know the server allows clientside Lua, why didn't it load?
- If this is the case, you can manually load the player. Go into your console and execute the following command: lua_run_cl include("autorun/client/musicplayer.lua")

I added music, but then it doesn't play and just removes itself from the playlist!
- You've either put in an invalid link/file path (double-check, links should be DIRECT, meaning if you open it in your browser the file downloads), or the playmode is wrong. It's also possible you didn't add the music correctly, remember to use quotes around the music's name!

How do I open a saved playlist?
- Your saved playlist is automatically opened when you get in the game, just hit play!

I got an error!
- Post a comment here and I'll look into it!
Коментарів: 135
patrlim 14 верес. о 6:28 
Some feature suggestions, not sure quite how feasible they are;

1. Playback scrubbing; let me scrub through the currently playing song
2. Folder playlists; make a directory where every folder in there is read in as a playlist, and you can swap between them, so i can have a swing folder with swing music, etc. (this one may be hard to implement)
3. Playlist restoration; If I clear my playlist, let me restore it from file.
patrlim 14 верес. о 6:00 
works with git servers, so you can upload your songs to github, and use the raw link (this IS a violation of github TOS though, so you could use a local git server if you care about your account)
Xx_commieslayer2010_xX 6 серп. о 1:40 
use a youtube to mp3 converter they're free
FoundTexture 26 лип. о 20:37 
Y'know what would be cool? If you actually told us what URLs it DOES work with!
And apparently downloading videos on Youtube requires your account to be PREMIUM.

I ain't gonna give Youtube money just to play music in GMod.
Bigsad2bigmad 15 лип. о 13:39 
yea this still dosen't do jack shit i just spent like 20 minutes of my time over here picking songs one by one just for it to not work..... it just skips over every song in a quick manner and says that the playlist is empty.
Clipity_Clip 12 серп. 2023 о 19:23 
Dosen't work with Spotify
(From what ive tried)
JELIMINATOR1000 17 черв. 2023 о 19:23 
No thanks! I'll just use the player on my PC. :steammocking:
MASTERCHIEF_357 14 квіт. 2023 о 9:36 
THIS THING IS GARBAGE NONE OF YOUR "fixes" WORK :steamthumbsdown: :steamthumbsdown:
McFattyPatty 20 лют. 2023 о 11:21 
for people trying to use YouTube, just use media player, if it's not working go on Garry's Mod x36(I believe) and if you don't know how just search it up on youtube ironically.
Tqbrock11 gaming 11 груд. 2022 о 11:10 
bro lol so trash, just pull up youtube in the background lol