View Single Post
Bara
AlliedModders Donor
Join Date: Apr 2012
Location: Germany
Old 08-12-2018 , 16:35   Re: [CSGO-Req] weapon sounds changer
Reply With Quote #11

But it just works for player who doesn't have this weapon/knife in the hand. Used this code as example/test:
Code:
#include <sourcemod>
#include <sdktools>

#pragma newdecls required

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

public Action SoundHook(int clients[64], int &numClients, char sound[PLATFORM_MAX_PATH], int &entity, int &channel, float &volume, int &level, int &pitch, int &flags)
{
    PrintToChatAll(sound);
    return Plugin_Stop;
}
__________________
Discord (Bara#5006) | My Plugins (GitHub)
You like my work? Support is not a crime.
Bara is offline