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

Problema con zombies en zp


  
 
 
Thread Tools Display Modes
Author Message
smacompile
Member
Join Date: Jun 2012
Location: tijuana
Old 11-03-2012 , 14:02   Problema con zombies en zp
#1

tengo otro problema, puse les clases por lvl y como que entoces me pide nivel 33 y yo las tengo con otro nivel por ej: la primera con 5 y la otra con 7.
__________________
de los errores se aprende........

Gracias: Destro-, Lucas, meTaLiCroSS, rak, xLeoNNN, Manu127, Skiel,BlackFur,

http://www.youtube.com/watch?v=btwG0...eature=related
smacompile is offline
LeeanAndNeka
Senior Member
Join Date: Feb 2012
Location: Argentina ♥
Old 11-03-2012 , 14:10   Re: Problema con zombies en zp
#2

Explicate mejor y si no mostras la codificacion no podemos ayudarte.
LeeanAndNeka is offline
Send a message via MSN to LeeanAndNeka Send a message via Skype™ to LeeanAndNeka
S3R6I0
Junior Member
Join Date: Jul 2012
Location: Calle falsa 123
Old 11-03-2012 , 14:10   Re: Problema con zombies en zp
#3

Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaahhhhhhhhhhhh !!!!!!!

Last edited by S3R6I0; 02-08-2013 at 13:42.
S3R6I0 is offline
smacompile
Member
Join Date: Jun 2012
Location: tijuana
Old 11-03-2012 , 14:21   Re: Problema con zombies en zp
#4

por ej :

PHP Code:
// Classic Zombie Attributes
new const zclass1_name[] = { "Aldeano" }
new const 
zclass1_info[] = { "" }
new const 
zclass1_model[] = { "Aldeano" }
new const 
zclass1_clawmodel[] = { "v_zm.mdl" }
const 
zclass1_health 2000
const zclass1_speed 190
const Float:zclass1_gravity 1.0
const Float:zclass1_knockback 1.0
const zclass1_level 1

// Raptor Zombie Attributes
new const zclass2_name[] = { "Infectado" }
new const 
zclass2_info[] = { "" }
new const 
zclass2_model[] = { "Infec" }
new const 
zclass2_clawmodel[] = { "v_infec.mdl" }
const 
zclass2_health 2200
const zclass2_speed 225
const Float:zclass2_gravity 1.0
const Float:zclass2_knockback 1.5
const zclass2_level 

// Poison Zombie Attributes
new const zclass3_name[] = { "Regenerator" }
new const 
zclass3_info[] = { "" }
new const 
zclass3_model[] = { "reg" }
new const 
zclass3_clawmodel[] = { "z6.mdl" }
const 
zclass3_health 2400
const zclass3_speed 190
const Float:zclass3_gravity 0.75
const Float:zclass3_knockback 1.25
const zclass3_level 12 
ahi se ve los niveles.

bueno resulta que en el menu para elegir el zombie me dice en todos nivel: 33.

PHP Code:
// Zombie Class Menu
public show_menu_zclass(id)
{
    
// Player disconnected
    
if (!g_is_connected[id])
        return;
        
    static 
menu[400], len, class
    
len 0
    
    
// Title
    
len += formatex(menu[len], charsmax(menu) - len"\y%L \r[%d-%d]^n^n"id"MENU_ZCLASS_TITLE"ZCLASSES_STARTID+1min(ZCLASSES_STARTID+7g_zclass_i))
    
    
// 1-7. Class List
    
for (class = ZCLASSES_STARTID; class < min(ZCLASSES_STARTID+7g_zclass_i); class++)
    {
        if (
g_level[id] >= g_zclass_lvl[class])
        {
            if (class == 
g_zombieclassnext[id])
                
len += formatex(menu[len], charsmax(menu) - len"\d%d. %s ^n", class-ZCLASSES_STARTID+1g_zclass_name[class])
            else 
                
len += formatex(menu[len], charsmax(menu) - len"\r%d.\w %s\y ^n", class-ZCLASSES_STARTID+1g_zclass_name[class])
        }
        else 
            
len += formatex(menu[len], sizeof menu len"\r%d.\d %s %s\r (Nivel Requerido: %d)^n", class-ZCLASSES_STARTID+1g_zclass_name[class], g_zclass_info[class], g_zclass_lvl[class])
    }
    
    
// 8. Back - 9. Next - 0. Exit
    
len += formatex(menu[len], charsmax(menu) - len"^n\r8.\w %L^n\r9.\w %L^n^n\r0.\w %L"id"MENU_BACK"id"MENU_NEXT"id"MENU_EXIT")
    
    
show_menu(idKEYSMENUmenu, -1"Zombie Class Menu")

__________________
de los errores se aprende........

Gracias: Destro-, Lucas, meTaLiCroSS, rak, xLeoNNN, Manu127, Skiel,BlackFur,

http://www.youtube.com/watch?v=btwG0...eature=related
smacompile is offline
DaXteR
BANNED
Join Date: Oct 2012
Location: Buenos Aires, Argentina
Old 11-03-2012 , 15:45   Re: Problema con zombies en zp
#5

Creo que eso sale porque pusiste una variable demás la cual no identificaste en ningún lado, pero ahi esta todo normal asique me mataste
DaXteR is offline
smacompile
Member
Join Date: Jun 2012
Location: tijuana
Old 11-03-2012 , 15:52   Re: Problema con zombies en zp
#6

PHP Code:
// Zombie Class Menu
public menu_zclass(idkey)
{
    
// Special keys / items list exceeded
    
if (key >= MENU_KEY_BACK || ZCLASSES_SELECTION >= g_zclass_i)
    {
        switch (
key)
        {
            case 
MENU_KEY_BACK// back
            
{
                if (
ZCLASSES_STARTID->= 0ZCLASSES_STARTID -= 7
            
}
            case 
MENU_KEY_NEXT// next
            
{
                if (
ZCLASSES_STARTID+g_zclass_iZCLASSES_STARTID += 7
            
}
            case 
MENU_KEY_EXIT// exit
            
{
                return 
PLUGIN_HANDLED;
            }
        }
        
        
// Show extra items menu again
        
show_menu_zclass(id)
        return 
PLUGIN_HANDLED;
    }
    return 
PLUGIN_HANDLED;  

__________________
de los errores se aprende........

Gracias: Destro-, Lucas, meTaLiCroSS, rak, xLeoNNN, Manu127, Skiel,BlackFur,

http://www.youtube.com/watch?v=btwG0...eature=related
smacompile is offline
dalegato
Senior Member
Join Date: Feb 2011
Old 11-03-2012 , 20:45   Re: Problema con zombies en zp
#7

PHP Code:
// Zombie Class Menu
public show_menu_zclass(id)
{
    
// Player disconnected
    
if (!is_user_connected(id))
        return;
    
    
// Bots pick their zombie class randomly
    
if (is_user_bot(id))
    {
        
g_zombieclassnext[id] = random_num(0g_zclass_i 1)
        return;
    }
    
    static 
menu[400], len, class
    
len 0
    
    
// Title
    
len += formatex(menu[len], sizeof menu len"y%L r[%d-%d]^n^n"id"MENU_ZCLASS_TITLE"ZCLASSES_STARTID+1min(ZCLASSES_STARTID+7g_zclass_i))
    
    
// 1-7. Class List
    
for (class = ZCLASSES_STARTID; class < min(ZCLASSES_STARTID+7g_zclass_i); class++)
    {
        if (
g_level(id) >= g_zclass_lvl[class])
        {
            if (class == 
g_zombieclassnext[id])
                
len += formatex(menu[len], sizeof menu len"d%d. %s %s^n", class-ZCLASSES_STARTID+1g_zclass_name[class], g_zclass_info[class])
            else
                
len += formatex(menu[len], sizeof menu len"r%d.w %sy %s^n", class-ZCLASSES_STARTID+1g_zclass_name[class], g_zclass_info[class])
        }
        else
            
len += formatex(menu[len], sizeof menu len"r%d.d %s %s r(Nivel Requerido: %d)^n", class-ZCLASSES_STARTID+1g_zclass_name[class], g_zclass_info[class], g_zclass_lvl[class])  
    }
    
    
// 8. Back - 9. Next - 0. Exit
    
len += formatex(menu[len], sizeof menu len"^nr8.w %L^nr9.w %L^n^nr0.w %L"id"MENU_BACK"id"MENU_NEXT"id"MENU_EXIT")
    
    
show_menu(idKEYSMENUmenu, -1"Zombie Class Menu")
}


// Zombie Class Menu
public menu_zclass(idkey)
{
    
// Special keys / items list exceeded
    
if (key >= MENU_KEY_BACK || ZCLASSES_SELECTION >= g_zclass_i)
    {
        switch (
key)
        {
            case 
MENU_KEY_BACK// back
            
{
                if (
ZCLASSES_STARTID->= 0ZCLASSES_STARTID -= 7
            
}
            case 
MENU_KEY_NEXT// next
            
{
                if (
ZCLASSES_STARTID+g_zclass_iZCLASSES_STARTID += 7
            
}
            case 
MENU_KEY_EXIT// exit
            
{
                return 
PLUGIN_HANDLED;
            }
        }
        
        
// Show extra items menu again
        
show_menu_zclass(id)
        return 
PLUGIN_HANDLED;
    }
    
    if (
g_level(id) >= g_zclass_lvl[ZCLASSES_SELECTION])
    {
        
// Store selection for the next infection
        
g_zombieclassnext[id] = ZCLASSES_SELECTION;
        
        
// Show selected zombie class info and stats
        
zp_colored_print(id"^x04[ZP]^x01 %L: %s"id"ZOMBIE_SELECT"g_zclass_name[g_zombieclassnext[id]])
        
zp_colored_print(id"^x04[ZP]^x01 %L: %d %L: %d %L: %d %L: %d%%"id"ZOMBIE_ATTRIB1"g_zclass_hp[g_zombieclassnext[id]], id"ZOMBIE_ATTRIB2"g_zclass_spd[g_zombieclassnext[id]],
        
id"ZOMBIE_ATTRIB3"floatround(g_zclass_grav[g_zombieclassnext[id]]*800), id"ZOMBIE_ATTRIB4"floatround(g_zclass_kb[g_zombieclassnext[id]]*100))
    }
    else
    {
        
zp_colored_print(id"^x04[ZP]^x01 No tenes Nivel suficiente para elegir esta Clase de Zombie. [Nivel Requerido: %d]"g_zclass_lvl[ZCLASSES_SELECTION])
        return 
PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_HANDLED;

Proba.

Last edited by dalegato; 11-03-2012 at 20:47.
dalegato 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:04.


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