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

[L4D & L4D2] Silenced Infected (1.2) [10-May-2020]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
1935
Plugin Version:
1.2
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Disable common, special, tank and witch sounds.
    Old 09-05-2010 , 06:08   [L4D & L4D2] Silenced Infected (1.2) [10-May-2020]
    Reply With Quote #1

    About:

    Simple plugin to block the sounds made by common infected, special infected, the tank and witch. The only sounds they make is with their feet. It does not stop the witch or tank music.


    Thanks:

    Spectrepaw - For naming the plugin.


    CVars:

    Saved to l4d_silenced_infected.cfg in your servers \cfg\sourcemod\ folder.

    PHP Code:
    // 0=Disables plugin, 1=Enables plugin.
    l4d_silenced_enable "1"

    // 0=Enables sounds, 1=Disables common infected sounds.
    l4d_silenced_common "1"

    // 0=Enables sounds, 1=Disables special infected sounds.
    l4d_silenced_special "1"

    // 0=Enables sounds, 1=Disables tank sounds.
    l4d_silenced_tank "1"

    // 0=Enables sounds, 1=Disables witch sounds.
    l4d_silenced_witch "1" 

    Changes:
    Code:
    1.2 (10-May-2020)
        - Various optimizations and fixes.
        - Various changes to tidy up code.
    
    1.1.1 (01-Jul-2019)
        - Var name changes. Update has no affect and is not required.
    
    1.1 (05-May-2018)
        - Converted plugin source to the latest syntax utilizing methodmaps. Requires SourceMod 1.8 or newer.
    
    1.0 (05-Sep-2010)
        - Initial release.

    Installation:
    1. Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d_silenced_infected.sp - 1094 views - 6.3 KB)
    __________________

    Last edited by Silvers; 05-10-2020 at 07:07. Reason: Text edit
    Silvers is offline
    AtomicStryker
    Veteran Member
    Join Date: Apr 2009
    Location: Teutonia!!
    Old 09-05-2010 , 08:51   Re: [L4D & L4D2] Silenced Infected
    Reply With Quote #2

    Neat. Some Sounds may be randomly heard?


    I propose you rewrite it to use a keyvalue config, so one can easily set which specific sounds he wants blocked. For example the 'idle' and 'spot' sounds only.
    AtomicStryker is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 09-05-2010 , 08:57   Re: [L4D & L4D2] Silenced Infected
    Reply With Quote #3

    Yeah I was thinking about that, will try to add.

    Randomly heard.. I think because the sounds are in a different folder. For example I have heard the tank cry a few times but no random sounds from any of the others, but apparently there has been.
    __________________
    Silvers is offline
    Fleepster99
    Senior Member
    Join Date: Apr 2010
    Old 09-05-2010 , 09:33   Re: [L4D & L4D2] Silenced Infected
    Reply With Quote #4

    Nice coding, btw was the tank sad? xD
    Fleepster99 is offline
    IronWarrior
    Veteran Member
    Join Date: Jan 2010
    Old 09-05-2010 , 18:40   Re: [L4D & L4D2] Silenced Infected
    Reply With Quote #5

    Would it be possible to add cvars to block sounds for classes? So to block Hunters only for a example?
    IronWarrior is offline
    Skorpion1976
    Veteran Member
    Join Date: Jun 2009
    Location: Austria
    Old 09-06-2010 , 18:26   Re: [L4D & L4D2] Silenced Infected
    Reply With Quote #6

    Maybe something like this? Dunno if this works, is an idea about detecting each zombie class. g_infected[i] should be the player.

    Code:
    if (i_Infected == 1) {// Infected sounds
            for (new i = 0; i < sizeof(g_Infected); i++) {
                if (StrContains(sample, g_Infected[i], false) > -1) 
                {
                    if (GetEntProp(g_Infected[i], Prop_Send, "m_zombieClass") == ZOMBIECLASS_JOCKEY)
                   {
                    volume = 0.0;
                    return Plugin_Changed;
                    } 
                }
            }
        }
    Skorpion1976 is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 09-06-2010 , 20:24   Re: [L4D & L4D2] Silenced Infected
    Reply With Quote #7

    That wouldn't work, the "i" is from the loop which is only looping through the array list of blocked sounds... I'll do what AtomicStryker said and re-write it with Keyvalues, that way you can create our own list of sounds to block, without having to edit and compile the source code.
    __________________
    Silvers is offline
    Nataraja
    Member
    Join Date: Jan 2010
    Old 09-13-2010 , 16:46   Re: [L4D & L4D2] Silenced Infected
    Reply With Quote #8

    Use in versus game mode?
    Nataraja is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 09-13-2010 , 16:54   Re: [L4D & L4D2] Silenced Infected
    Reply With Quote #9

    It should work in versus yeah.

    I still want to update this with keyvalues or something like that.
    __________________
    Silvers is offline
    darktemplarr
    Member
    Join Date: Jun 2010
    Old 12-18-2010 , 13:54   Re: [L4D & L4D2] Silenced Infected
    Reply With Quote #10

    is there anyway you could make this so that it does not announce when any cvars are changed with it? especially the disable enable one? because I toggle this on and off quite frequently and it is annoying that all of my players can see it. I want to run my commands discretely because that is how I run my custom game modes server.
    darktemplarr 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 21:23.


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