Hi, sometimes sound wont play when another sound is being played. My question is: Is it possible to play multiple sound at the same time using emit or force it to play?
PHP Code:
public DeathMsg()
{
new Victim = read_data(2); //get the second message parameter
new origin[3];
pev(Victim, pev_origin, origin);
new entity = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"));
engfunc(EngFunc_SetOrigin, entity, origin);
set_pev(entity, pev_classname, "emitter");
emit_sound(entity, CHAN_VOICE, "misc/affn.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM);
set_task(5.0, "kill_entity", entity+1337);
}
And
PHP Code:
public func_sounds(id, channel, const sound[], Float:volume, Float:attn, flags, pitch)
{
if(equal(sound[7],"bhit",4))
{
engfunc(EngFunc_EmitSound,id,channel,pain[random_num(0, sizeof pain - 1)],volume,attn,flags,pitch)
return FMRES_SUPERCEDE
}
return FMRES_IGNORED
}