Code:
#include <amxmodx>
#include <fakemeta>
public plugin_init() {
register_plugin("Remove Use Sound", "untested", "syphilis")
register_forward(FM_EmitSound, "forward_EmitSound")
}
public forward_EmitSound(entity, channel, const sample[]) {
//if statements written by T(+)rget in Chickenmod: Rebirth
if (entity > 32 || entity < 1) return FMRES_IGNORED
if (equal(sample, "common/wpn_denyselect.wav")) return FMRES_SUPERCEDE
return FMRES_IGNORED
}
public plugin_modules() {
require_module("fakemeta")
}
Basically forwards metamod's EmitSound(), which is called whenever a sound is heard server-side. In the forward, checks to make sure the sound is coming from a player, then it checks if it's the use sound. If it is, FMRES_SUPERCEDE makes metamod ignore the sound, otherwise FMRES_IGNORED makes metamod act as if the forward were never called.
Also, I know the forward will work correctly, since I had to write it in my port of Chickenmod: Rebirth. I can't guarantee anything on the entire script, seeing that it's two in the morning and I've spent more time typing this explanation than I did with the script