Raised This Month: $32 Target: $400
 8% 

[CS:GO/?] Music Player


Post New Thread Reply   
 
Thread Tools Display Modes
Author
SpirT
Senior Member
Join Date: Sep 2018
Location: Portugal
Plugin ID:
7464
Plugin Version:
1.0.2
Plugin Category:
Fun Stuff
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    A music player
    Old 01-16-2021 , 10:06   [CS:GO/?] Music Player
    Reply With Quote #1

    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.
    Attached Files
    File Type: zip Music & Sound Player (1.0).zip (13.2 KB, 311 views)
    File Type: zip Music & Sound Player (1.0.1).zip (13.7 KB, 239 views)
    File Type: zip Music & Sound Player (1.0.2).zip (15.0 KB, 489 views)
    __________________

    Last edited by SpirT; 09-02-2021 at 04:43. Reason: Update - v.1.0.2
    SpirT is offline
    darkbret
    Junior Member
    Join Date: Sep 2019
    Old 01-16-2021 , 10:28   Re: [ANY] Music Player
    Reply With Quote #2

    Where do i put music file?
    darkbret is offline
    SpirT
    Senior Member
    Join Date: Sep 2018
    Location: Portugal
    Old 01-16-2021 , 10:55   Re: [ANY] Music Player
    Reply With Quote #3

    Quote:
    Originally Posted by darkbret View Post
    Where do i put music file?
    I forgot to mention that, sorry. Files should be placed at sound/SpirT/
    __________________
    SpirT is offline
    diasdighetto
    Junior Member
    Join Date: Dec 2018
    Location: Portugal
    Old 01-16-2021 , 10:59   Re: [ANY] Music Player
    Reply With Quote #4

    Nice release bro!
    diasdighetto is offline
    SpirT
    Senior Member
    Join Date: Sep 2018
    Location: Portugal
    Old 01-16-2021 , 11:01   Re: [ANY] Music Player
    Reply With Quote #5

    Quote:
    Originally Posted by diasdighetto View Post
    Nice release bro!
    Thanks!
    __________________

    Last edited by SpirT; 01-16-2021 at 11:01.
    SpirT is offline
    Rugal
    Senior Member
    Join Date: Jun 2020
    Location: Brazil
    Old 01-16-2021 , 15:34   Re: [ANY] Music Player
    Reply With Quote #6

    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

    Last edited by Rugal; 01-16-2021 at 16:17.
    Rugal is offline
    SpirT
    Senior Member
    Join Date: Sep 2018
    Location: Portugal
    Old 01-16-2021 , 16:57   Re: [ANY] Music Player
    Reply With Quote #7

    Quote:
    Originally Posted by Rugal View Post
    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.
    __________________
    SpirT is offline
    Rugal
    Senior Member
    Join Date: Jun 2020
    Location: Brazil
    Old 01-16-2021 , 17:05   Re: [ANY] Music Player
    Reply With Quote #8

    Quote:
    Originally Posted by SpirT View Post
    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.

    Last edited by Rugal; 01-16-2021 at 17:16.
    Rugal is offline
    SpirT
    Senior Member
    Join Date: Sep 2018
    Location: Portugal
    Old 01-16-2021 , 17:48   Re: [ANY] Music Player
    Reply With Quote #9

    Quote:
    Originally Posted by Rugal View Post
    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.
    Attached Files
    File Type: smx spirt_downloads_fix.smx (4.5 KB, 164 views)
    __________________
    SpirT is offline
    Rugal
    Senior Member
    Join Date: Jun 2020
    Location: Brazil
    Old 01-16-2021 , 17:59   Re: [ANY] Music Player
    Reply With Quote #10

    Quote:
    Originally Posted by SpirT View Post
    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.

    Last edited by Rugal; 01-16-2021 at 18:23.
    Rugal is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 09:02.


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