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)
}