Raised This Month: $ Target: $400
 0% 

[ZP] Ayuda con repeticionde Sonidos (Zombie Stalker)


  
 
 
Thread Tools Display Modes
Author Message
GokuX
BANNED
Join Date: Jun 2011
Location: Quilpué , Chile
Old 12-01-2011 , 19:20   [ZP] Ayuda con repeticionde Sonidos (Zombie Stalker)
#1

Hola, gente bueno como dice el titulo necesito ayuda con la repeticion de sonidos del zombie stalker.

El problema es que cuando se vuelve invisible repite el sonido de invisibilidad una y otra vez y quisiera saber como puedo hacer que se repita una sola vez les dejo el code:

PHP Code:
public fw_PlayerPreThink(id)
{
    if(!
is_user_alive(id) || !zp_get_user_zombie(id) || zp_get_user_nemesis(id) || zp_get_user_assassin(id) || zp_get_user_muerte(id))
        return 
PLUGIN_CONTINUE;
    
    if(
zp_get_user_zombie_class(id) != g_zclass_stalker)
        return 
PLUGIN_CONTINUE;
    
    new 
button pev(idpev_button)
    
    if(
button IN_ATTACK || button IN_ATTACK2)
    {
        
set_user_rendering(idkRenderFxNone0,0,0kRenderNormal255)
        
set_task(0.1"visible"id);
        
color(id"\g[ZP]\n Eres Visible ahora.")
        }
    else
    {
        
set_user_rendering(idkRenderFxGlowShell000kRenderTransAlpha7)
        
set_task(0.1"invisible"id);
        
color(id"\g[ZP]\n Eres Invisible ahora.")
        }
     
    return 
PLUGIN_HANDLED
}

public 
visible(id)
{
   
emit_sound(idCHAN_STREAMsound_stalker_visible1.0ATTN_NORM0PITCH_NORM);
}

public 
invisible(id)
{
   
emit_sound(idCHAN_STREAMsound_slatker_invisible1.0ATTN_NORM0PITCH_NORM);

PERDON POR EL DOBLE POST ME EQUIVOQUE D:

Last edited by GokuX; 12-01-2011 at 19:26. Reason: perdon por el doble post me equivoque D:
GokuX is offline
Old 12-01-2011, 19:24
GokuX
This message has been deleted by GokuX.
rak
Veteran Member
Join Date: Oct 2011
Location: banned country
Old 12-01-2011 , 19:50   Re: [ZP] Ayuda con repeticionde Sonidos (Zombie Stalker)
#2

no probaste con un bool?

EDIT: osea..

PHP Code:
 if(button IN_ATTACK || button IN_ATTACK2)
    {
        
set_user_rendering(idkRenderFxNone0,0,0kRenderNormal255)
        
set_task(0.1"visible"id);
        
color(id"\g[ZP]\n Eres Visible ahora.")
        
sonido true
        
}
    else
    {
        
set_user_rendering(idkRenderFxGlowShell000kRenderTransAlpha7)
        if(
sonido == true)
        {
                
set_task(0.1"invisible"id);
                
sonido false
        
}
        
color(id"\g[ZP]\n Eres Invisible ahora.")
        }
     
    return 
PLUGIN_HANDLED 
... algo asi se me ocurre xD
__________________

www.amxmodx-es.com

Steam: Luchokoldo

Last edited by rak; 12-01-2011 at 20:04.
rak is offline
Send a message via MSN to rak Send a message via Skype™ to rak
KillLikoe
BANNED
Join Date: Nov 2010
Location: Paraguay
Old 12-01-2011 , 21:07   Re: [ZP] Ayuda con repeticionde Sonidos (Zombie Stalker)
#3

Quote:
Originally Posted by rak View Post
no probaste con un bool?

EDIT: osea..

PHP Code:
 if(button IN_ATTACK || button IN_ATTACK2)
    {
        
set_user_rendering(idkRenderFxNone0,0,0kRenderNormal255)
        
set_task(0.1"visible"id);
        
color(id"\g[ZP]\n Eres Visible ahora.")
        
sonido true
        
}
    else
    {
        
set_user_rendering(idkRenderFxGlowShell000kRenderTransAlpha7)
        if(
sonido == true)
        {
                
set_task(0.1"invisible"id);
                
sonido false
        
}
        
color(id"\g[ZP]\n Eres Invisible ahora.")
        }
     
    return 
PLUGIN_HANDLED 
... algo asi se me ocurre xD
a la variable sonido tenes que indexarle
KillLikoe is offline
rak
Veteran Member
Join Date: Oct 2011
Location: banned country
Old 12-01-2011 , 21:23   Re: [ZP] Ayuda con repeticionde Sonidos (Zombie Stalker)
#4

no entiendo q queres decir xD
__________________

www.amxmodx-es.com

Steam: Luchokoldo
rak is offline
Send a message via MSN to rak Send a message via Skype™ to rak
GokuX
BANNED
Join Date: Jun 2011
Location: Quilpué , Chile
Old 12-02-2011 , 08:44   Re: [ZP] Ayuda con repeticionde Sonidos (Zombie Stalker)
#5

No pero a lo que me refiero es que cuando se vuelva visible o invisible el sonido suene una vez pero cuando vuelva a hacerse visible vuelva a solar 1 vez, y lo mismo cuando se vuelva invisible.

PD: GRACIAS POR AYUDARME PERO YA LO SOLUCIONE USE VARIABLES

Last edited by GokuX; 12-02-2011 at 09:53.
GokuX is offline
KillLikoe
BANNED
Join Date: Nov 2010
Location: Paraguay
Old 12-02-2011 , 11:17   Re: [ZP] Ayuda con repeticionde Sonidos (Zombie Stalker)
#6

Quote:
Originally Posted by GokuX View Post
No pero a lo que me refiero es que cuando se vuelva visible o invisible el sonido suene una vez pero cuando vuelva a hacerse visible vuelva a solar 1 vez, y lo mismo cuando se vuelva invisible.

PD: GRACIAS POR AYUDARME PERO YA LO SOLUCIONE USE VARIABLES
variables indexadas verdad?
KillLikoe 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 13:22.


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