View Single Post
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 07-15-2020 , 17:33   Re: [L4D2] Mute l4d1 survivors join voices?
Reply With Quote #2

PHP Code:
#include <sourcemod>
#include <sdktools>

public void OnPluginStart()
{
    
AddNormalSoundHook(SoundHook);
}

public 
Action SoundHook(int clients[64], int &numClientschar sample[PLATFORM_MAX_PATH], int &entityint &channelfloat &volumeint &levelint &pitchint &flags)
{
    if( 
strncmp(sample"player\\survivor\\voice"21) == )
    {
        if( 
StrContains(sample[25], "scenariojoin") != -)
        {
            
volume 0.0;
            return 
Plugin_Changed;
        }
    }
    return 
Plugin_Continue;

__________________
Silvers is offline