AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CS:GO/?] Music Player (https://forums.alliedmods.net/showthread.php?t=329999)

SpirT 01-16-2021 10:06

[CS:GO/?] Music Player
 
3 Attachment(s)
Music Player

by SpirT

WARNING: Some people did send some messages on discord and steam complaining about some games that were having issues with the keyvalues. I have only tested on CS:GO, therefore this is the only source game currently supported. If you found that other games work, please reply at this post, otherwise, leave a pull request at github with the game that doesn't work. In the future, I may release a version for the game that does not work. Most likely to the older games, because this is only happening with old source engine servers.

Games tested that do not work:
- Half-Life 2: DeathMatch
- Counter-Strike: Source
- No More Room in Hell

What is this?
A Music Player. This will allow you to play any song inside your server if they're setup at the config files.

Commands
sm_music - Opens a menu where players are able to choose any music to play.
sm_stop - Stops the current playing music.
sm_playervol - Sets the volume that all the musics will be played with.

Requirements
- SourceMod Installed on your server (plugin was tested on 1.10 build 6502)
- MetaMod Installed on your server (plugin was tested on 1.11 build 1144)

Installation
  • Upload all files to your server
  • Upload your music files to 'sound/SpirT'
  • Restart your server / change map / type this command in your server console: 'sm plugins reload spirt_musicplayer'
  • Config files are located at 'csgo/addons/sourcemod/configs/SpirT/Music-Player/'
  • Follow the config samples

ToDo List
  • Nothing for now


GitHub Repo
Latest Release

Releases
-------------
1.0.2:
-> Fixed an error where the player won't be able to play the music on the next round if he had music player.
-> Added a function to add all music files to the downloads table and to precache them on map start.
-------------
1.0.1:
-> Fixed some "invalid handles" that were being spammed to the server console
-------------
1.0.0:
-> Plugin Release
-------------

For any issue or bug, reply to the post or contact me on steam.

darkbret 01-16-2021 10:28

Re: [ANY] Music Player
 
Where do i put music file?

SpirT 01-16-2021 10:55

Re: [ANY] Music Player
 
Quote:

Originally Posted by darkbret (Post 2732818)
Where do i put music file?

I forgot to mention that, sorry. Files should be placed at sound/SpirT/

diasdighetto 01-16-2021 10:59

Re: [ANY] Music Player
 
Nice release bro!

SpirT 01-16-2021 11:01

Re: [ANY] Music Player
 
Quote:

Originally Posted by diasdighetto (Post 2732823)
Nice release bro!

Thanks!

Rugal 01-16-2021 15:34

Re: [ANY] Music Player
 
Does this have some kind of "limit"?
I mean if the plugin supports any music format.
.wav .mp3 etc


Obtaining this when trying to play a song in mp3 format:

L 01/16/2021 - 18:15:41: [SM] Exception reported: Invalid key value handle 0 (error 4)
L 01/16/2021 - 18:15:41: [SM] Blaming: musicplayer.smx
L 01/16/2021 - 18:15:41: [SM] Call stack trace:
L 01/16/2021 - 18:15:41: [SM] [0] KvGotoNextKey
L 01/16/2021 - 18:15:41: [SM] [1] Line 236, D:\Desktop\Projetos CSGO\Plugins\Music & Sound Player - Backup\musicplayer.sp::MusicsHandle

SpirT 01-16-2021 16:57

Re: [ANY] Music Player
 
Quote:

Originally Posted by Rugal (Post 2732863)
Does this have some kind of "limit"?
I mean if the plugin supports any music format.
.wav .mp3 etc


Obtaining this when trying to play a song in mp3 format:

L 01/16/2021 - 18:15:41: [SM] Exception reported: Invalid key value handle 0 (error 4)
L 01/16/2021 - 18:15:41: [SM] Blaming: musicplayer.smx
L 01/16/2021 - 18:15:41: [SM] Call stack trace:
L 01/16/2021 - 18:15:41: [SM] [0] KvGotoNextKey
L 01/16/2021 - 18:15:41: [SM] [1] Line 236, D:\Desktop\Projetos CSGO\Plugins\Music & Sound Player - Backup\musicplayer.sp::MusicsHandle

Hello. Thanks for your feedback. I fixed that little error that was being spammed to the console.

About the music format, it just emits the sound to the client, which means, any sound format supported by CS:GO would run with this plugins. By those extentions mp3, m4a and wav should work just fine.

Rugal 01-16-2021 17:05

Re: [ANY] Music Player
 
Quote:

Originally Posted by SpirT (Post 2732869)
Hello. Thanks for your feedback. I fixed that little error that was being spammed to the console.

About the music format, it just emits the sound to the client, which means, any sound format supported by CS:GO would run with this plugins. By those extentions mp3, m4a and wav should work just fine.


I have a suggestion to add to this plugin, I believe it would make a little more sense for him.
It would be interesting when a player chooses a song, this song plays only for the player he chose.
This would make all players choose their favorite songs. After all, each has a different taste.

Sorry for the bad English.

EDIT: I tested the plugin again, I am not getting any errors in the logs or in the console, however the music is not playing yet.

SpirT 01-16-2021 17:48

Re: [ANY] Music Player
 
1 Attachment(s)
Quote:

Originally Posted by Rugal (Post 2732870)
I have a suggestion to add to this plugin, I believe it would make a little more sense for him.
It would be interesting when a player chooses a song, this song plays only for the player he chose.
This would make all players choose their favorite songs. After all, each has a different taste.

Sorry for the bad English.

EDIT: I tested the plugin again, I am not getting any errors in the logs or in the console, however the music is not playing yet.

Are your music files on your FastDownload server? You must download the file. At the github repo, there is a youtube video where I test the plugin. I did a plugin that adds all files at the folders and subfolders of "sound/", "materials/" and "models/". Should fix your issue (attached). Please if it fixes your problem, reply with the feedback, so I can do 1 more update to resolve that little issue that some other people might have!

About your suggestion, that's not a bad idea, but, even so, if I don't want to listen to any music, why would someone play music for me? I understand your meaning but, even though, there's no such "logic" on that. Maybe for example, what could be added is a feature where you could do a "vote" that you can choose a song and if others want to, it would play the song to them, but as I said, that would be a little of spam.

Hope you understand... I can do a private update for you, of course, but I just don't think anyone would like to have that feature.

Rugal 01-16-2021 17:59

Re: [ANY] Music Player
 
Quote:

Originally Posted by SpirT (Post 2732876)
Are your music files on your FastDownload server? You must download the file. At the github repo, there is a youtube video where I test the plugin. I did a plugin that adds all files at the folders and subfolders of "sound/", "materials/" and "models/". Should fix your issue (attached). Please if it fixes your problem, reply with the feedback, so I can do 1 more update to resolve that little issue that some other people might have!

About your suggestion, that's not a bad idea, but, even so, if I don't want to listen to any music, why would someone play music for me? I understand your meaning but, even though, there's no such "logic" on that. Maybe for example, what could be added is a feature where you could do a "vote" that you can choose a song and if others want to, it would play the song to them, but as I said, that would be a little of spam.

Hope you understand... I can do a private update for you, of course, but I just don't think anyone would like to have that feature.

Yes, the sound file was downloaded by my FastDL normally, the music just doesn't play for me.
I will install this plugin that you attached and test again.
About my suggestion, I made it because I once saw a plugin that played music on the server, and it had the option of playing the song just for you or everyone, and many people like me liked the idea.

EDIT:
I tested it again only this time with another song, and it worked normally, the first song still doesn't work. Both are in mp3 format.
With or without that plugin you attached is working.


All times are GMT -4. The time now is 10:59.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.