AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   move to trash (https://forums.alliedmods.net/showthread.php?t=319943)

GoGetSomeSleep 11-27-2019 17:42

move to trash
 
move to trash

Silvers 11-27-2019 18:48

Re: L4D2 How to mute auto vocalizes
 
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;




All times are GMT -4. The time now is 04:55.

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