23/02/2019, 02:58 PM
(Última modificación: 24/02/2019, 11:20 PM por Reverant. Edited 9 times in total.)
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
Aqui dejo lo que se necesitaria para ayudarme creeo. Dejo el .sma por si prefieren verlo de esa manera..
/----------------Solucion------------------\
Gracias hk-416
Código PHP:
if (resetall)
for (new i; i < sizeof g_skill_max; i++)
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] = 0
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[][] =
{
{ 10, 10, 10, 10, 10 }, // HUMANS
{ 10, 10, 10, 10, 10 } // 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 i = 0; i < 5; i++)
{
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] = 0