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

[ES][TUT][ZP] Elejir color de aura [ZP 4.2]


  
 
 
Thread Tools Display Modes
Author Message
JuaNCruZ
BANNED
Join Date: Jan 2010
Location: Argentina - Mendoza
Old 01-30-2010 , 07:16   [ES][TUT][ZP] Elejir color de aura [ZP 4.2]
#1

Elejir color de aura a cierto modo - ZP 4.2.

Descripcion: Sirve para elejir el color de aura que cada uno quiera en cierto modo. Como por ejemplo el nemesis.

Creditos: Kiske por presentar la forma para el NVG

Bueno primero que nada tenemos que abrir nuestro zombie_plague40.sma o como lo tengan llamado e ir a las variables y poner lo siguiente:

PHP Code:
new g_aura[33][3
Luego ir al siguiente public:

PHP Code:
client_putinserver 
Y Colocar lo siguiente:
PHP Code:
g_aura[id] = { 255155
Hay estamos denominando el color default.

Ahora nos vamos al final del plugin y ponemos:
PHP Code:
// Menu Aura
public menu_aura(idkey)
{
    switch (
key)
    {
        case 
0:
        {
            
g_aura[id] = { 2550}
            
show_menu_aura(id)
            
zp_colored_print(id"^x04[B.F.T]^x01 - Elejiste el color de Aura:^x04 Rojo")
        }
        case 
1
        {
            
g_aura[id] = { 0255}
            
show_menu_aura(id)
            
zp_colored_print(id"^x04[B.F.T]^x01 - Elejiste el color de Aura:^x04 Verde")
        }
        case 
2
        {
            
g_aura[id] = { 00255 }
            
show_menu_aura(id)
            
zp_colored_print(id"^x04[B.F.T]^x01 - Elejiste el color de Aura:^x04 Azul")
        }
        case 
3
        {
            
g_aura[id] = { 255255255 }
            
show_menu_aura(id)
            
zp_colored_print(id"^x04[B.F.T]^x01 - Elejiste el color de Aura:^x04 Blanco")
        }
        case 
4
        {
            
g_aura[id] = { 255255}
            
show_menu_aura(id)
            
zp_colored_print(id"^x04[B.F.T]^x01 - Elejiste el color de Aura:^x04 Amarillo")
        }
        case 
5
        {
            
g_aura[id] = { 0255255 }
            
show_menu_aura(id)
            
zp_colored_print(id"^x04[B.F.T]^x01 - Elejiste el color de Aura:^x04 Celeste")
        }
        case 
6
        {
            
g_aura[id] = { 2550255 }
            
show_menu_aura(id)
            
zp_colored_print(id"^x04[B.F.T]^x01 - Elejiste el color de Aura:^x04 Violeta")
        }
    }
    
    return 
PLUGIN_HANDLED;
}

// Menu Aura
public show_menu_aura(id)
{
    static 
menu[999], len
    len 
0
    
    
// Title
    
len += formatex(menu[len], sizeof menu len"\y%L^n^n"id"MENU_AURA_COLOR_TITLE")
    
    
// Description
    
len += formatex(menu[len], sizeof menu len"\yZombie Plague Warfare \rv1.1^n")
    
len += formatex(menu[len], sizeof menu len"\yLevel: \r%d / \r301 \yAP: \r%d^n^n"g_level[id], g_ammopacks[id])
    
    
len += formatex(menu[len], sizeof menu len"\r1. \y%L^n"id"MENU_COLOR1")
    
len += formatex(menu[len], sizeof menu len"\r2. \y%L^n"id"MENU_COLOR2")
    
len += formatex(menu[len], sizeof menu len"\r3. \y%L^n"id"MENU_COLOR3")
    
len += formatex(menu[len], sizeof menu len"\r4. \y%L^n"id"MENU_COLOR4")
    
len += formatex(menu[len], sizeof menu len"\r5. \y%L^n"id"MENU_COLOR5")
    
len += formatex(menu[len], sizeof menu len"\r6. \y%L^n"id"MENU_COLOR6")
    
len += formatex(menu[len], sizeof menu len"\r7. \y%L^n"id"MENU_COLOR7")
    
    
len += formatex(menu[len], sizeof menu len"^n\r0. \y%L"id"MENU_AURA_COLOR_EXIT")
    
    
show_menu(idKEYSMENUmenu, -1"Menu Aura")

Luego vamos al siguiente public:

PHP Code:
zombie_aura 
y remplazamos esto:

PHP Code:
    // Colored Aura
    
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
    
write_byte(TE_DLIGHT// TE id
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y
    
engfunc(EngFunc_WriteCoordoriginF[2]) // z
    
write_byte(20// radius
    
write_byte(get_pcvar_num(cvar_nemnvgcolor[0])) // r
    
write_byte(get_pcvar_num(cvar_nemnvgcolor[1])) // g
    
write_byte(get_pcvar_num(cvar_nemnvgcolor[2])) // b
    
write_byte(2// life
    
write_byte(0// decay rate
    
message_end() 
por esto:

PHP Code:
    // Colored Aura
    
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF0)
    
write_byte(TE_DLIGHT// TE id
    
engfunc(EngFunc_WriteCoordoriginF[0]) // x
    
engfunc(EngFunc_WriteCoordoriginF[1]) // y
    
engfunc(EngFunc_WriteCoordoriginF[2]) // z
    
write_byte(20// radius
    
write_byte(g_aura[id][0]) // r
    
write_byte(g_aura[id][1]) // g
    
write_byte(g_aura[id][2]) // b
    
write_byte(2// life
    
write_byte(0// decay rate
    
message_end() 
y por ultimo en el siguiente public:
PHP Code:
plugin_init 
ponemos:

PHP Code:
register_menu("Menu Aura"KEYSMENU"menu_aura"
**************************
EN EL LANG DEL ZP COLOCAMOS:
**************************
Quote:
MENU_AURA_COLOR_TITLE = Elejir color de Aura al Wesker
MENU_AURA_COLOR_EXIT = Salir
MENU_COLOR1 = Rojo
MENU_COLOR2 = Verde
MENU_COLOR3 = Azul
MENU_COLOR4 = Blanco
MENU_COLOR5 = Amarillo
MENU_COLOR6 = Celeste
MENU_COLOR7 = Rosado

Last edited by JuaNCruZ; 01-30-2010 at 07:19.
JuaNCruZ is offline
Send a message via MSN to JuaNCruZ
Javivi
AlliedModders Donor
Join Date: Dec 2008
Old 01-30-2010 , 07:22   Re: [ES][TUT][ZP] Elejir color de aura [ZP 4.2]
#2

No hace falta usar un lang para añadir las cosas, es mejor hacerlo directo desde el plugin, porque seguro que nadie lo va a traducir a los demas idiomas del zp asi que no sirve de nada.



Saca el show_menu_aura(id) de los case y ponlo al final del switch.
__________________
Javivi is offline
JuaNCruZ
BANNED
Join Date: Jan 2010
Location: Argentina - Mendoza
Old 01-30-2010 , 07:29   Re: [ES][TUT][ZP] Elejir color de aura [ZP 4.2]
#3

Okazz... ahora lo ago lo que pasa que taba en la otra pc y me anda media mal
JuaNCruZ is offline
Send a message via MSN to JuaNCruZ
fechu
BANNED
Join Date: Sep 2009
Location: aliedmod
Old 01-30-2010 , 07:36   Re: [ES][TUT][ZP] Elejir color de aura [ZP 4.2]
#4

copado juan (y
gracias por el tuto

Last edited by fechu; 01-30-2010 at 07:40.
fechu is offline
Send a message via MSN to fechu Send a message via Skype™ to fechu
ecurbelo
BANNED
Join Date: Dec 2009
Location: Matando Trolls (Haslers)
Old 01-30-2010 , 07:37   Re: [ES][TUT][ZP] Elejir color de aura [ZP 4.2]
#5

u s e
ecurbelo is offline
ecurbelo
BANNED
Join Date: Dec 2009
Location: Matando Trolls (Haslers)
Old 01-30-2010 , 07:38   Re: [ES][TUT][ZP] Elejir color de aura [ZP 4.2]
#6

l e s s
ecurbelo is offline
<-----(MATIAS)----->
Senior Member
Join Date: Aug 2009
Location: Argentina - Entre Rios
Old 01-30-2010 , 09:25   Re: [ES][TUT][ZP] Elejir color de aura [ZP 4.2]
#7

una pregunta, si yo me elijo el aura, yo solo me puedo ver el color de mi aura o todos ven mi color?
__________________
Zombie Assassin video:
Models:
IP: 201.212.2.13:27016
<-----(MATIAS)-----> is offline
Send a message via MSN to <-----(MATIAS)----->
Cisko94
Senior Member
Join Date: Oct 2009
Old 01-30-2010 , 10:00   Re: [ES][TUT][ZP] Elejir color de aura [ZP 4.2]
#8

Muy bueno..se agradece este tuto.
__________________
100% Vago
100% vicio
50% loco
Cisko94 is offline
Send a message via Yahoo to Cisko94
JuaNCruZ
BANNED
Join Date: Jan 2010
Location: Argentina - Mendoza
Old 01-30-2010 , 10:11   Re: [ES][TUT][ZP] Elejir color de aura [ZP 4.2]
#9

mira matias, en eso toy, como no tengo el server no tengo forma de testear, supongo que vos solo por el id, ni idea
JuaNCruZ is offline
Send a message via MSN to JuaNCruZ
Hasler46
BANNED
Join Date: Jan 2010
Old 01-30-2010 , 11:28   Re: [ES][TUT][ZP] Elejir color de aura [ZP 4.2]
#10

Quote:
Originally Posted by ecurbelo View Post
u s e
gordo
Hasler46 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 04:13.


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