return FMRES_SUPERCEDE
For fun_alinone i'm using this :
PHP Code:
/* AMX Mod Plugin
*
* (c) Copyright 2007, DokTor
* This file is provided as is (no warranties).
*
*/
#include <amxmodx>
#include <fakemeta>
#define TASKID1 1346876341
#define VOL_LOW 0.2
public plugin_init() {
register_plugin("fun allione sounds", "0.2", "DokTor")
new szMapname[13]
get_mapname(szMapname, 12)
if(!equali(szMapname,"fun_allinone") && !equali(szMapname,"fun_allione"))
pause("ae")
register_forward(FM_EmitSound, "fw_EmitSound")
register_forward(FM_EmitAmbientSound, "fw_EmitAmbientSound")
register_clcmd("say", "check_say")
set_task(5.0, "Task_StopEcho", TASKID1, _, _, "b")
}
public plugin_end() {
client_cmd(0, "room_type 0")
}
public fw_EmitSound(ent, chan, const sample[], Float:vol, Float:attn, flags, pitch)
{
// doors/doormove8.wav doors/doorstop8.wav
if(sample[0] != 'd' || sample[6] != 'd' || sample[14] != '8')
return FMRES_IGNORED
engfunc(EngFunc_EmitSound, ent, chan, sample, VOL_LOW, attn, flags, pitch)
return FMRES_SUPERCEDE
}
public fw_EmitAmbientSound(ent, Float:pos[3], const sample[], Float:vol, Float:attn, flags, pitch)
{
// debris/beamstart10.wav
if(sample[0] != 'd' || sample[7] != 'b' || sample[17] != '0')
return FMRES_IGNORED
engfunc(EngFunc_EmitAmbientSound, ent, pos, sample, VOL_LOW, attn, flags, pitch)
return PLUGIN_HANDLED
}
public Task_StopEcho()
{
static const szCmd[] = "room_type 0"
client_cmd(0, szCmd)
}
public check_say(id)
{
new text[192]
read_args(text,192)
remove_quotes(text)
if(containi(text, "echo") != -1)
client_cmd(id, "room_type 0")
}
__________________