Raised This Month: $51 Target: $400
 12% 

move to trash


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GoGetSomeSleep
Senior Member
Join Date: Dec 2018
Location: Miami/Florida
Old 11-27-2019 , 17:42   move to trash
Reply With Quote #1

move to trash

Last edited by GoGetSomeSleep; 03-11-2020 at 14:55.
GoGetSomeSleep is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 11-27-2019 , 18:48   Re: L4D2 How to mute auto vocalizes
Reply With Quote #2

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

public Plugin myinfo =
{
    
name "[L4D & L4D2] Manual Vocalize Only",
    
author "SilverShot",
    
description "Blocks automatic vocalizing.",
    
version "1.0",
    
url "https://forums.alliedmods.net/showthread.php?t=319943"
}

float g_fTime;

public 
void OnPluginStart()
{
    
AddCommandListener(Vocalize"vocalize");
    
AddNormalSoundHook(SoundHook);
}

public 
Action Vocalize(int client, const char[] commandint argc)
{
    
g_fTime GetGameTime() + 0.1;
}

public 
Action SoundHook(int clients[64], int &numClientschar sample[PLATFORM_MAX_PATH], int &entityint &channelfloat &volumeint &levelint &pitchint &flags)
{
    
// player/survivor/voice/
    
if( GetGameTime() > g_fTime && sample[0] == 'p' && sample[7] == 's' && sample[16] == 'v' && sample[21] == '\\' )
        return 
Plugin_Handled;
    return 
Plugin_Continue;

__________________

Last edited by Silvers; 11-27-2019 at 18:51. Reason: includes
Silvers 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 08:44.


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