Raised This Month: $32 Target: $400
 8% 

Custom death sound don't work :(


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Nax0ne
Senior Member
Join Date: Jul 2011
Location: Chile
Old 09-17-2014 , 23:49   Custom death sound don't work :(
Reply With Quote #1

Hello!

I have a little problem: I've made a few customizable sounds death when a zombie dies. But the problem is that when the zombie dies, the death sound is not heard and heard the default CS sound of the player.

The sounds of "pain" work perfectly, but the "death" no.

Help me!

PHP Code:
public fw_emitsound(idchannel, const sample[128], Float:volumeFloat:attnflagspitch)
{
    if (!
is_user_connected(id) || !is_user_alive(id) || !zp_get_user_zombie(id) || zp_get_user_nemesis(id))
        return 
FMRES_IGNORED;

    if((
sample[7] == 'b' && sample[8] == 'h' && sample[9] == 'i' && sample[10] == 't') || (sample[7] == 'h' && sample[8] == 'e' && sample[9] == 'a' && sample[10] == 'd')) 
    { 
        
emit_sound(idchannelg_zombi_pain_snd[random(sizeof(g_zombi_pain_snd))], volumeattnflagspitch)
        return 
FMRES_SUPERCEDE
    }
    
    if(
sample[7] == 'd' && ((sample[8] == 'i' && sample[9] == 'e') || (sample[8] == 'e' && sample[9] == 'a')))
    { 
        
emit_sound(idchannelg_zombi_death_snd[random(sizeof(g_zombi_death_snd))], volumeattnflagspitch)
        return 
FMRES_SUPERCEDE;    
    }    
    
    return 
FMRES_IGNORED;

__________________

Last edited by Nax0ne; 09-17-2014 at 23:50.
Nax0ne is offline
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 09-18-2014 , 19:24   Re: Custom death sound don't work :(
Reply With Quote #2

Try just to delete
PHP Code:
!is_user_alive(id
Krtola is offline
Send a message via Skype™ to Krtola
Nax0ne
Senior Member
Join Date: Jul 2011
Location: Chile
Old 09-18-2014 , 19:37   Re: Custom death sound don't work :(
Reply With Quote #3

Quote:
Originally Posted by Krtola View Post
Try just to delete
PHP Code:
!is_user_alive(id
LOOOOOOL !



Thank you man. It works perfectly.

__________________
Nax0ne is offline
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 09-18-2014 , 19:40   Re: Custom death sound don't work :(
Reply With Quote #4

Quote:
Originally Posted by Nax0ne View Post
LOOOOOOL !



Thank you man. It works perfectly.

Excellent
Krtola is offline
Send a message via Skype™ to Krtola
Reply



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 04:35.


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