Update:
Hi, it did work but I'm having a bit of a problem.
The knife sound disappear after adding the pain sound delay.
PHP Code:
public fwEmitSound2(id, channel, const sound[], Float:volume, Float:attn, flags, pitch)
{
if(!is_user_connected(id))
return FMRES_IGNORED;
cs_get_user_model(id, model, charsmax(model))
if( get_gametime( ) - g_Time > IntervalBetweenSounds ) {
if(equal(sound[7],"bhit",4) && equal(model, "sas") == 1)
engfunc(EngFunc_EmitSound, id, channel, pain_spk[random_num(0, sizeof pain_spk - 1)], 1.0, 0.92, flags, pitch);
g_Time = get_gametime( );
return FMRES_SUPERCEDE;
}
else return FMRES_SUPERCEDE;
return FMRES_IGNORED;
}