View Single Post
AtomicStryker
Veteran Member
Join Date: Apr 2009
Location: Teutonia!!
Old 01-12-2011 , 05:36   Re: [L4D2] Standardized Revamp Structure (srsmod)
Reply With Quote #451

By the way heres another little tweak of mine. Teetasse put it into his confogl addition plugin but why shouldn't everyone get the joy?


It finally makes the Survivors not hear Infected ghosts jumping around. Infected hear themselves just fine.

PHP Code:
#pragma semicolon 1
#include <sourcemod>
#include <sdktools>

static const String:INFECTED_FALL_SOUND[]    = "player/jumplanding_zombie.wav";
static const        
TEAM_INFECTED            3;

public 
OnPluginStart()
{
    
AddNormalSoundHook(NormalSHook:SoundHook);
}

public 
Action:SoundHook(clients[64], &numClientsString:sample[PLATFORM_MAX_PATH], &entity)
{
    if (
StrEqual(sampleINFECTED_FALL_SOUND))
    {
        
numClients 0;
    
        for (new 
1<= MaxClientsi++)
        {
            if (
IsClientInGame(i)
            && !
IsFakeClient(i)
            && 
GetClientTeam(i) == TEAM_INFECTED)
            {
                
clients[numClients] = i;
                
numClients++;
            }
        }
        
        return 
Plugin_Changed;
    }
    
    return 
Plugin_Continue;

Attached Files
File Type: sp Get Plugin or Get Source (l4d_inaudible_ghosts.sp - 644 views - 695 Bytes)
AtomicStryker is offline