Raised This Month: $51 Target: $400
 12% 

[ES][TUT][ZP] Color de ScreenFade al ser infectado: ZP 4.2


  
 
 
Thread Tools Display Modes
Author Message
[B.F.T]-JUANCRUZ
BANNED
Join Date: Oct 2009
Location: Argentina, Mendoza, Godo
Old 12-05-2009 , 21:04   [ES][TUT][ZP] Color de ScreenFade al ser infectado: ZP 4.2
#1

TUTORIAL PARA CAMBIARLE EL COLOR AL SCREEN FADE CUANDO SOS INFECTADO: ZP 4.2


Descripcion: Cambiamos el color del Screen Fade en Colores Rojos, Verdes o Azules. O tambien entre esos colores

Bueno Empecemos:


Busquemos la siguiente linea:

PHP Code:
infection_effects(id
Mas abajo encontramos esto:

PHP Code:
    // Screen fade?
    
if (get_pcvar_num(cvar_infectionscreenfade))
    {
        
message_begin(MSG_ONE_UNRELIABLEg_msgScreenFade_id)
        
write_short(UNIT_SECOND*1// duration
        
write_short(UNIT_SECOND*0// hold time
        
write_short(FFADE_IN// fade type
        
write_byte((g_nemesis[id]) ? get_pcvar_num(cvar_nemnvgcolor[0]) : get_pcvar_num(cvar_nvgcolor[0])) // r
        
write_byte((g_nemesis[id]) ? get_pcvar_num(cvar_nemnvgcolor[1]) : get_pcvar_num(cvar_nvgcolor[1])) // g
        
write_byte((g_nemesis[id]) ? get_pcvar_num(cvar_nemnvgcolor[2]) : get_pcvar_num(cvar_nvgcolor[2])) // b
        
write_byte (255// alpha
        
message_end()
    } 
Hasta hay el color del Screen Fade es del color de NVG, Cuando es nemesis le sale rojo si el NVG era rojo, y cuando sos infectado como zombie sale el color que era Verde como NVG.

Ahora si queremos que sea de otro color para ambos, tanto nemesis como zombie, nos quedaria asi:

PHP Code:
    // Screen fade?
    
if (get_pcvar_num(cvar_infectionscreenfade))
    {
        
message_begin(MSG_ONE_UNRELIABLEg_msgScreenFade_id)
        
write_short(UNIT_SECOND*1// duration
        
write_short(UNIT_SECOND*0// hold time
        
write_short(FFADE_IN// fade type
        
write_byte(0// rojo
        
write_byte(255// verde
        
write_byte(0// azul
        
write_byte (255// alpha
        
message_end()
    } 
Hay el color seria Verde, hay lo podemos cambiar si quieren a otros colores, doy el verde como ejemplo.

Tambien hay otra manera, que pongamos el screen fade con colores al azar, es decir: que salga entre rojo y verde vendria a ser amarillo, etc

Entonces nos quedaria asi:

PHP Code:
    // Screen fade?
    
if (get_pcvar_num(cvar_infectionscreenfade))
    {
        
message_begin(MSG_ONE_UNRELIABLEg_msgScreenFade_id)
        
write_short(UNIT_SECOND*1// duration
        
write_short(UNIT_SECOND*0// hold time
        
write_short(FFADE_IN// fade type
        
write_byte(random_num(50,200)) // r
        
write_byte(random_num(50,200)) // g
        
write_byte(random_num(50,200)) // b
        
write_byte (255// alpha
        
message_end()
    } 
Tambien podemos hacer que dure el screen un tiempo "X" seteado por nosotros by [L]ol:

PHP Code:
if (get_pcvar_num(cvar_infectionscreenfade))
{
         static 
Float:realinfect
         realinfect 
get_pcvar_float(cvar_timeinfection)

         
// Add a green tint to their screen
         
message_begin(MSG_ONE_UNRELIABLEg_msgScreenFade_id)
         
write_short(UNIT_SECOND*1// duration
         
write_short(floatround(UNIT_SECOND*realinfect)) // hold time
         
write_short(FFADE_IN// fade type
         
write_byte(0// red
         
write_byte(255// green
         
write_byte(0// blue
         
write_byte(100// alpha
         
message_end()

Bueno gente espero que este bien explicado y que les aya gustado

Last edited by [B.F.T]-JUANCRUZ; 12-05-2009 at 21:25.
[B.F.T]-JUANCRUZ is offline
Send a message via MSN to [B.F.T]-JUANCRUZ
[L]oL
Senior Member
Join Date: Dec 2009
Old 12-05-2009 , 21:14   Re: [ES][TUT][ZP] Color de ScreenFade al ser infectado: ZP 4.2
#2

Si te das cuenta screen fade ya tiene pero esta bien lo que haces

yo para darle un toque mas de realismo hago le pongo esto :

PHP Code:
if (get_pcvar_num(cvar_infectionscreenfade))
{
static 
Float:realinfect
realinfect 
get_pcvar_float(cvar_timeinfection)

// Add a green tint to their screen
message_begin(MSG_ONE_UNRELIABLEg_msgScreenFade_id)
write_short(UNIT_SECOND*1// duration
write_short(floatround(UNIT_SECOND*realinfect)) // hold time
write_short(FFADE_IN// fade type
write_byte(0// red
write_byte(255// green
write_byte(0// blue
write_byte(100// alpha
message_end()

y registras la cvar "cvar_timeinfection" que lo uso para ver cuanto tiempo quiero que dure el screen.
[L]oL is offline
[B.F.T]-JUANCRUZ
BANNED
Join Date: Oct 2009
Location: Argentina, Mendoza, Godo
Old 12-05-2009 , 21:19   Re: [ES][TUT][ZP] Color de ScreenFade al ser infectado: ZP 4.2
#3

pero muy bien, ahora lo pongo perame
[B.F.T]-JUANCRUZ is offline
Send a message via MSN to [B.F.T]-JUANCRUZ
Raddish
BANNED
Join Date: Jul 2008
Location: Argentina
Old 12-05-2009 , 22:35   Re: [ES][TUT][ZP] Color de ScreenFade al ser infectado: ZP 4.2
#4

Alfin un tutorial bueno +k xD
Raddish is offline
[B.F.T]-JUANCRUZ
BANNED
Join Date: Oct 2009
Location: Argentina, Mendoza, Godo
Old 12-05-2009 , 22:51   Re: [ES][TUT][ZP] Color de ScreenFade al ser infectado: ZP 4.2
#5

gracias raddish
[B.F.T]-JUANCRUZ is offline
Send a message via MSN to [B.F.T]-JUANCRUZ
Hasler
BANNED
Join Date: Jul 2009
Location: Argentina, Rosario
Old 12-05-2009 , 23:42   Re: [ES][TUT][ZP] Color de ScreenFade al ser infectado: ZP 4.2
#6

avanzaste mucho juan =) seguì asi :E yo sigo con mi soccerjam hasta mejorarlo y pasarlo a Leo wahahahahaa ( nunca lo voy a psar y.y es un bocho ese pibe )
Hasler is offline
[B.F.T]-JUANCRUZ
BANNED
Join Date: Oct 2009
Location: Argentina, Mendoza, Godo
Old 12-05-2009 , 23:53   Re: [ES][TUT][ZP] Color de ScreenFade al ser infectado: ZP 4.2
#7

jajaa, alfin papi volviste, ea!!!
[B.F.T]-JUANCRUZ is offline
Send a message via MSN to [B.F.T]-JUANCRUZ
 



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


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