#include <amxmodx>
#include <fun>
#define SILENTGRENADES // Закоментировать, что бы отключить бесшумные шаги, когда в руках гранаты.
public plugin_init()
{
register_plugin("Silent Knife and Grenades", "0.0.1", "Albertio");
register_event("CurWeapon", "WeaponChange", "be", "1=1");
}
public WeaponChange(id)
{
static weapon_name[33];
get_weaponname(read_data(2), weapon_name, charsmax(weapon_name));
if(equali(weapon_name, "weapon_knife"))
{
set_user_footsteps(id, 1);
}
#if defined SILENTGRENADES
else if(equali(weapon_name, "weapon_hegrenade") || equali(weapon_name, "weapon_smokegrenade") || equali(weapon_name, "weapon_flashbang"))
{
set_user_footsteps(id, 1);
}
#endif
else
{
set_user_footsteps(id, 0);
}
}