#pragma semicolon 1
#pragma newdecls required
#include <sdktools>
#include <sdktools_sound>
public Plugin myinfo =
{
name = "[CSS] Weapon Sound Blocker",
author = "DENZEL519 & AI",
description = "Blocks weapon sounds (shooting, reloading, etc.) in CS:S",
version = "1.0",
}
public void OnPluginStart()
{
AddNormalSoundHook(SoundHook);
}
public Action SoundHook(int clients[64], int &numClients, char sample[PLATFORM_MAX_PATH], int &entity, int &channel, float &volume, int &level, int &pitch, int &flags)
{
// Блокируем звуки оружий (выстрелы, перезарядка, переключение и т.д.)
if (StrContains(sample, "weapons/", false) == 0)
{
// Можно добавить исключения (например, звуки ножей)
if (StrContains(sample, "knife", false) != -1)
{
return Plugin_Continue;
}
return Plugin_Stop;
}
// Блокируем другие звуки (например, подбор гранат, дефуз-кита и т.д.)
if (StrContains(sample, "items/", false) == 0)
{
return Plugin_Stop;
}
return Plugin_Continue;
}