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

[ANY] Toggle Music & Volume Control (3.7.8, 2017-11-21)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Agent Wesker
Senior Member
Join Date: Apr 2012
Plugin ID:
5547
Plugin Version:
3.7.8
Plugin Category:
Gameplay
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Allows clients to stop ambient sounds / music played by the map, and control the volume of said sounds.
    Old 02-24-2017 , 20:12   [ANY] Toggle Music & Volume Control (3.7.8, 2017-11-21)
    Reply With Quote #1

    Info
    I made this plugin specifically for CS:GO ZE gamemode as the maps tend to have many sounds playing which by default cannot be turned off. Although I have only tested this with CS:GO it should work for any Source game (such as CS:S). This plugin has been through many revisions but I am happy to say it is at a point where it works 100%. Please test and give me any feedback you may have.


    *Notes*
    • The plugin seems to be bugged on Linux servers, sounds will not terminate and may overlap. It should work fine on Windows servers.
    • Versions before 3.7.6 may cause server crashes, ensure you update
    • Make sure you have the latest version of dhooks installed

    Tested & Working on:
    • ze_pizzatime_v2
    • ze_ffvii_mako_reactor_p8
    • zm_uprugiy_xep_v26
    Credits to Mitch for key pieces of code that allows this to work & which this plugin is based.


    Commands / Cvar
    Code:
    sm_music - Calls the music toggle menu
    sm_stopmusic - Stops music immediately
    sm_volume - Calls the volume controls menu
    sm_togglemusic_debug - Default "0", change to "1" to enable debug print
    Changelog:
    Quote:
    Version 3.7.0:
    • Added more channels to global sounds, to prevent issues with overlap
    • Added support for FadeOut command (3.7.1)
    • Moved sound caching to PlaySound command in case the map modifies the entity (3.7.1)
    • Prevent CS:GO round start / death sounds from playing (3.7.3)
    • More compatibility changes for maps that didn't work previously with this plugin (3.7.3)
    • Fixed kill input on dhooked entities causing a crash from a void parameter (3.7.5)
    • Map volume changes will now be ignored (3.7.5)
    • Fixed 3.7.5 not playing music on some maps (3.7.6)
    • Added support for "ToggleSound" input (3.7.7)
    • Added debug convar sm_togglemusic_debug (3.7.7)
    • Possible work-around for soundscripts through ambient_generic (3.7.8)
    • Support for point_clientcommand (fix for ze_surf_facility) (3.7.8)
    Version 3.6.5:
    Spoiler
    >> Github Repo <<

    Download Latest Version 3.7.8:
    Download compiled plugin (.smx)
    Install DHooks, this is a requirement
    Attached Files
    File Type: smx togglemusic_dhook.smx (15.7 KB, 2870 views)

    Last edited by Agent Wesker; 11-21-2017 at 19:55. Reason: Info Changes
    Agent Wesker is offline
    Cripix
    Senior Member
    Join Date: Sep 2016
    Location: French, Bordeaux
    Old 02-25-2017 , 09:39   Re: [CS:GO] Toggle Music & Volume Control
    Reply With Quote #2

    The plugin works fine on my server
    Cripix is offline
    MFS
    AlliedModders Donor
    Join Date: Dec 2010
    Old 02-25-2017 , 21:20   Re: [CS:GO] Toggle Music & Volume Control
    Reply With Quote #3

    This works for the plugin RoundEndSound?
    MFS is offline
    Divin12
    Senior Member
    Join Date: Nov 2011
    Old 02-26-2017 , 00:11   Re: [CS:GO] Toggle Music & Volume Control
    Reply With Quote #4

    I think is not working with soundany inc.
    __________________
    Divin12 is offline
    Agent Wesker
    Senior Member
    Join Date: Apr 2012
    Old 02-26-2017 , 09:38   Re: [CS:GO] Toggle Music & Volume Control
    Reply With Quote #5

    Quote:
    Originally Posted by MFS View Post
    This works for the plugin RoundEndSound?
    It will stop round sounds if you toggle music off, so I think the answer is yes?

    (I assume you mean this plugin https://forums.alliedmods.net/showthread.php?t=143016)

    Quote:
    Originally Posted by Divin12 View Post
    I think is not working with soundany inc.
    Please elaborate on this; are you talking about this https://forums.alliedmods.net/showthread.php?t=237045

    And the problem is sound not being stopped?

    Edit:

    I add new convar sm_stopmusic_mapambient, set to "0" to handle ambient sounds from server.

    Last edited by Agent Wesker; 02-26-2017 at 09:56.
    Agent Wesker is offline
    MFS
    AlliedModders Donor
    Join Date: Dec 2010
    Old 02-26-2017 , 14:45   Re: [CS:GO] Toggle Music & Volume Control
    Reply With Quote #6

    I mean Abner RoundEndSound.
    MFS is offline
    MFS
    AlliedModders Donor
    Join Date: Dec 2010
    Old 02-26-2017 , 14:57   Re: [CS:GO] Toggle Music & Volume Control
    Reply With Quote #7

    I checked, the plugin works fine. Reduce global volume.

    Is it possible to modify the plugin to decreased volume only at the end of the round?
    MFS is offline
    zhell
    Member
    Join Date: Oct 2016
    Location: Sweden
    Old 04-18-2017 , 17:45   Re: [CS:GO] Toggle Music & Volume Control
    Reply With Quote #8

    Isn't the volume thing supposed to change music volume instead of all sounds? would be helpful if you could fix that.
    zhell is offline
    Deadhuntz
    AlliedModders Donor
    Join Date: Dec 2015
    Location: Germany look behind you!
    Old 04-19-2017 , 15:17   Re: [CS:GO] Toggle Music & Volume Control
    Reply With Quote #9

    Quote:
    Originally Posted by zhell View Post
    Isn't the volume thing supposed to change music volume instead of all sounds? would be helpful if you could fix that.
    +1
    __________________


    Do you speak english? see i so out?
    Deadhuntz is offline
    Agent Wesker
    Senior Member
    Join Date: Apr 2012
    Old 04-20-2017 , 08:40   Re: [CS:GO] Toggle Music & Volume Control
    Reply With Quote #10

    Quote:
    Originally Posted by zhell View Post
    Isn't the volume thing supposed to change music volume instead of all sounds? would be helpful if you could fix that.
    The original method was to cancel the map sound, and play new sound at a specified volume. Problem with this method is that the map no longer can stop the sound and leads to problems like overlapping music.

    I'm not sure there is any other way but I have one idea that is yet to be tested in-game. I will report back soon if it is viable and let you know
    Agent Wesker 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 00:18.


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