Hi, I have a problem with the percentage, the first level of range I'm doing well, but cuand Otengo range "C", etc, does not start from 0, so I would like to help me fix it and Begin 0 pls ..
PHP Code:
new g_rango[33]
enum _:Rangos_Hm
{
Nombre_Rango[20], //Para El HUD
Exp_Requerida, // Experiencia Requerida Para El Proximo Rango
Vida
}
enum _:MAX_RANGOS {
E = 0,
D,
C,
B,
A,
S
}
PHP Code:
new const gRangosHumanos[MAX_RANGOS][Rangos_Hm] =
{
{ "E", 0, 110 },
{ "D", 10, 120 },
{ "C", 20, 130 },
{ "B", 40, 140 },
{ "A", 150, 150 },
{ "S", 200, 160 }
}
PHP Code:
public porciento_nivel(id)
{
new Float:numero
numero = (g_frags[id] * 100.0) / gRangosHumanos[g_rango[id]][Exp_Requerida]
return numero 0.0;
}
Thanks.