[Solucionado]Ayuda para resetear habilidades de un jugador nuevo
#1
Hola, extraje las habilidades del ZA, ahora necesito resetear las variables para que cuando se conecte un nuevo jugador, no obtenga las habilidades aumentadas de otro, como deberia de hacerlo? Intente pero me sale el siguiente error
Código PHP:
if (resetall)
    for (new 
isizeof g_skill_maxi++)
        
g_habilidad[id][0][i] = 0
     
//10502    for (new i; i < sizeof g_kill_max; i++)
        
g_habilidad[id][1][i] = 0
     
    g_puntos
[id][0] = 0
    g_gastados
[id][0] = 0
    g_puntos
[id][1] = 0
    g_gastados
[id][1] = 

Cita:Error: Undefined symbol "g_kill_max" on line 10205

Aqui dejo lo que se necesitaria para ayudarme creeo. Dejo el .sma por si prefieren verlo de esa manera..
Código PHP:
new g_habilidad[33][2][5]
new 
g_puntos[33][2]
new 
g_gastados[33][2]

// Human and zombie max skills
new const g_skill_max[][] =
{
        { 
1010101010 }, // HUMANS
        
1010101010 }  // ZOMBIES
}



// Human and zombie skill names
new const g_skill_names[2][5][] =
{
        {
                
"Aumentar Ataque",    
                
"Aumentar Vitalidad",
                
"Aumentar Velocidad",         // HUMANS
                
"Disminuir Gravedad",
                
"Aumentar Armadura"
        
},
        {
                
"Aumentar Ataque",
                
"Aumentar Vitalidad",
                
"Aumentar Velocidad",         // ZOMBIES
                
"Disminuir Gravedad",
                
"Aumentar Defensa"
        
}
}

// Mejoras por Macro
#define ammount_cost(%1)        (%1 * 3) + 1 // Costo de habilidad
#define ammount_hdamage(%1)         (%1 + 3) * 0.3 // human damage skill
#define ammount_hhealth(%1)         (%1 * 10) // Human health
#define ammount_hspeed(%1)         (%1 * 5) // Human speed
#define ammount_hgravity(%1)     ((%1 * 0.01) * 2) // Human gravity
#define ammount_harmor(%1)         (%1 * 10) // Human armor
#define ammount_zdamage(%1)         (%1 + 3) * 0.3 // Zombie damage
#define ammount_zhealth(%1)         (%1 * 250) // Zombie health
#define ammount_zspeed(%1)         (%1 * 15) // Zombie speed
#define ammount_zgravity(%1)     ((%1 * 0.5) * 2) // Zombie gravity 
#define ammount_zdefense(%1)        (%1 * 0.5) // zombie defense skill 

/----------------Solucion------------------\
Gracias hk-416
Código PHP:
        for (new 05i++)
        {
            
g_habilidad[id][0][i] = 0
            g_habilidad
[id][1][i] = 0
        
}
        
g_puntos[id][0] = 0
        g_gastados
[id][0] = 0
        g_puntos
[id][1] = 0
        g_gastados
[id][1] = 


Archivos adjuntos
.sma   Descargar AMXX / zpparty.sma (Tamaño: 456.28 KB / Descargas: 2)
Responder
#2
g_kill_max no lo defines.
Responder
#3
Disculpen la edit del mensaje, pero no tenia sentido lo que comente, actualice el thread..
Responder
#4
Código PHP:
arraysetg_variableid ], 0sizeofg_variable[ ] ) ); 

Con tú variable sería así:
Código PHP:
arraysetg_habilidadid ][ ], 0sizeofg_habilidad[ ][ ] ) ); 

Responder
#5
Prueba ahora y dime que tal


Archivos adjuntos
.sma   Descargar AMXX / zpparty (1).sma (Tamaño: 456.25 KB / Descargas: 5)
“Quien te quiere en su vida, volverá a buscarte”
Qué frase más estúpida
Porque quien te quiere en su vida, jamás se iría.
Responder
#6
(23/02/2019, 06:15 PM)HK-416 escribió: Prueba ahora y dime que tal

Genial hk-416, gracias!
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)