CODE
<?php
$retard1 = mysql_query("SELECT `rankpoints`, `rank` FROM `users` WHERE `username`='$username'");
while($retard = mysql_fetch_row($retard1)){
$rankp= $retard[0];
$currank= $retard[1];
}
$query=mysql_query("SELECT * FROM users WHERE username='$username'");
$fetch=mysql_fetch_object($query);
$query1=mysql_query("SELECT * FROM user_info WHERE username='$username'");
$info=mysql_fetch_object($query1);
$currank=$fetch->rank;
$rankp = $fetch->rankpoints;
if ($currank == "Scum"){
$max = "40";
$old="0";
}elseif ($currank == "Tramp"){
$max = '200';
$old="40";
}elseif ($currank == "Crook"){
$max = '800';
$old="200";
}elseif ($currank == 'Thief'){
$max = '1600';
$old="800";
}elseif ($currank == "Druglord"){
$max = '2600';
$old="1600";
}elseif ($currank == "Gangster"){
$max = '4200';
$old="2600";
}elseif ($currank == "Mobster"){
$max = '5600';
$old="4200";
}elseif ($currank == "Soldier"){
$max = '7200';
$old="5600";
}elseif ($currank == "General"){
$max = '9000';
$old="7200";
}elseif ($currank == "Local Boss"){
$max = '18000';
$old="9000";
}elseif ($currank == "Boss"){
$max = '36000';
$old="18000";
}elseif ($currank == "Assasin"){
$max = '72000';
$old="36000";
}elseif ($currank == "Capo Bastone"){
$max = '144000';
$old="72000";
}elseif ($currank == "Don"){
$max = '288000';
$old="144000";
}elseif ($currank == "God Father/Mother"){
$max = '566000';
$old="288000";
}elseif ($currank == "Moderator"){
$max = '2147483647';
$old="0";
}elseif ($currank == "Co-Owner"){
$max = '2147483647';
$old="0";
}elseif ($currank == "Owner"){
$max = '2147483647';
$old="0";
}
$percent = round((($rankp-$old)/($max-$old))*100000);
?><? echo makecomma($percent); ?>%
this is for a mafia game and i want the makecomma to a decimal