Just tested, no still played. I thaught it might work by stopping the plugin at SDKHook_TraceAttack (at this point the damage isn't yet calculated correctly by CS:GO). But I was wrong. The body impact sound is played even if I use this code:
Code:
#include <sdktools>
#include <sdkhooks>
public OnPluginStart()
{
AddTempEntHook("Shotgun Shot", Hook_ShotgunShot);
}
public Action Hook_ShotgunShot(const char[] te_name, const int[] players, int numClients, float delay)
{
return Plugin_Stop;
}
public OnClientPutInServer(client)
{
SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamage); //unklar ob man das hier braucht
//SDKHook(client, SDKHook_OnTakeDamageAlive, OnTakeDamage); //unklar ob man das hier braucht
SDKHook(client, SDKHook_TraceAttack, OnTraceAttack); //unklar ob man das hier braucht
}
public Action:OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype, &weapon, Float:damageForce[3], Float:damagePosition[3])
{
PrintToChatAll("OnTakeDamage Damagetype=%d (%f.1)", damagetype, damage);
return Plugin_Handled;
}
public Action:OnTraceAttack(victim, &attacker, &inflictor, &Float:damage, &damagetype, &ammotype, hitbox, hitgroup)
{
PrintToChatAll("OnTraceAttack Damagetype=%d (%f.1)", damagetype, damage);
return Plugin_Stop;
}