Raised This Month: $ Target: $400
 0% 

help with percentage


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Lucho.
Member
Join Date: Jul 2012
Location: Buenos Aires, Argentina
Old 06-05-2014 , 19:49   help with percentage
Reply With Quote #1

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 {
    
0,
    
D,
    
C,
    
B,
    
A,
    
S

PHP Code:
new const gRangosHumanos[MAX_RANGOS][Rangos_Hm] = 

    { 
"E"0110 }, 
    { 
"D"10120 }, 
    { 
"C"20130 }, 
    { 
"B"40140 }, 
    { 
"A"150150 }, 
    { 
"S"200160 }
   

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.

Last edited by Lucho.; 06-05-2014 at 19:50.
Lucho. 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 09:35.


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