hello.
this is part of the code that are currently written by me.
this code can change possible by other sounds.
it is not possible to change this sound only ctwin, terwin.
there is a problem with my code?
help me.
thanks.
source code here:
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fakemeta>
#include <fun>
#include <hamsandwich>
public plugin_init()
{
register_plugin("PLUGIN", "VERSION", "AUTHOR")
register_forward(FM_EmitSound, "forward_fm_emitsound")
}
new const new_ctwin[][] =
{
"newsound/ctwin.wav"
}
new const new_terwin[][] =
{
"newsound/terwin.wav"
}
public forward_fm_emitsound(id, iChannel, sample[], Float:fVolume, Float:fAttenuation, iFlags, iPitch)
{
if(equali(sample, "radio/ctwin.wav"))
{
engfunc(EngFunc_EmitSound, id, CHAN_STATIC, new_ctwin, 1.0, ATTN_NORM, 0, PITCH_NORM)
}
if(equali(sample, "radio/terwin.wav"))
{
engfunc(EngFunc_EmitSound, id, CHAN_STATIC, new_terwin, 1.0, ATTN_NORM, 0, PITCH_NORM)
}
return FMRES_SUPERCEDE
}