Raised This Month: $ Target: $400
 0% 

Emit sound


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
cstrike37
Member
Join Date: Jan 2012
Old 05-09-2013 , 18:39   Emit sound
Reply With Quote #1

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(Victimpev_originorigin);
    
    new 
entity engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"));
    
engfunc(EngFunc_SetOriginentityorigin);
    
set_pev(entitypev_classname"emitter");
    
    
emit_sound(entityCHAN_VOICE"misc/affn.wav"VOL_NORMATTN_NORM0PITCH_NORM);
    
    
set_task(5.0"kill_entity"entity+1337);

And

PHP Code:
public func_sounds(idchannel, const sound[], Float:volumeFloat:attnflagspitch)
{
    if(
equal(sound[7],"bhit",4))
    {
        
engfunc(EngFunc_EmitSound,id,channel,pain[random_num(0sizeof pain 1)],volume,attn,flags,pitch)
        return 
FMRES_SUPERCEDE
    
}
    return 
FMRES_IGNORED


Last edited by cstrike37; 05-09-2013 at 18:41.
cstrike37 is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:58.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode