Raised This Month: $ Target: $400
 0% 

How Can I calculate percentage to next rank ( based on frags) )


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
danonix
Senior Member
Join Date: Dec 2012
Old 01-26-2013 , 04:35   How Can I calculate percentage to next rank ( based on frags) )
Reply With Quote #1

Hello guys, how can I calculate percentage of my rank? I mean that, so if I have got 3 frags of 29 how can I calculate percent? Something like that. How it should look if its possible? Can you send me a tip? Thanks

Code:
public xp(id)
{
    static stats[8]
    if ( stats[0] >= 0 && stats[0] < 29)
    exp == stats[0]/29
    set_hudmessage(255, 0, 0, -1.0, 0.01)
    show_hudmessage(id, "Your XP: %d", exp);
    
    else if (stats[0] > 29 && stats[0] < 40)
    exp1 == stats[0]/40
    set_hudmessage(255, 0, 0, -1.0, 0.01)
    show_hudmessage(id, "Your XP: %d", exp1)
    
}

Last edited by danonix; 01-26-2013 at 04:35.
danonix 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 20:30.


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