#include <amxmodx>
#include <fakemeta>
#define PLUGIN "No Knife Sound"
#define VERSION "1.0"
#define AUTHOR "R3X"
#define DEBUG
new g_toblock[][]={
"weapons/elite_fire.wav",
"weapons/elite-1.wav"
};
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);
register_forward(FM_EmitSound, "fwdEmitSound");
}
public fwdEmitSound(ent, iChannel, const szSample[], Float:fVolume, Float:fAttenuation, iFlags, iPitch){
if(is_user_connected(ent)){
#if defined DEBUG
client_print(ent, print_chat, "Sample:%s iChannel=%d", szSample, iChannel);
#endif
if(iChannel==CHAN_WEAPON || iChannel == CHAN_ITEM){
for(new i=0;i < sizeof g_toblock;i++)
if(equal(szSample, g_toblock[i]))
return FMRES_SUPERCEDE;
}
}
return FMRES_IGNORED;
}
Czy coś jest tu źle?