Raised This Month: $ Target: $400
 0% 

Death Sounds HELP!!! ******


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 09-15-2007 , 22:20   Re: Death Sounds HELP!!! ******
Reply With Quote #5

Here is a more further detailed example based from connorrs example:
PHP Code:
public fwEmitSound(idchannel, const sound[], Float:volumeFloat:attenuationflagspitch)
{
    
// Check to see if user is connected and a zombie (using isZombie for example)
    
if(!is_user_connected(id) || !isZombie[id])
        return 
FMRES_IGNORED;
    
    if(
containi(sound"die") != -|| containi(sound"death") != -1)
    {
        
// Here it will play your sound and block the old death sound
        
engfunc(EngFunc_EmitSoundidchannel"zombie/zombie_die3.wav"1.0attenuationflagspitch);
        
        
// Below I made it so it would play a random death sound when they died, just for an example
        /*
        new randNum = random_num(1, 4);
        switch(randNum)
        {
            case 1: engfunc(EngFunc_EmitSound, id, channel, ZOMBIE_DEATH_1, 0.7, attenuation, flags, pitch);
            case 2: engfunc(EngFunc_EmitSound, id, channel, ZOMBIE_DEATH_2, 0.7, attenuation, flags, pitch);
            case 3: engfunc(EngFunc_EmitSound, id, channel, ZOMBIE_DEATH_3, 0.7, attenuation, flags, pitch);
            case 4: engfunc(EngFunc_EmitSound, id, channel, ZOMBIE_DEATH_4, 0.7, attenuation, flags, pitch);
        }
        */
        
return FMRES_SUPERCEDE;
    }
    
    return 
FMRES_IGNORED;

hlstriker is offline
 



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 16:14.


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