Its my first post but i really need some help with this script.
The script works great and it does what i want to do but i have decided to change it so when it counts "$user['totalgames']" it will count them as 5 points each and i would also like to include another variable that would be "$user['totalcomments']" and it would represent the total comments made by this user and the script should add them all together and echo the current rank but how would i make the script add 4 points for each "totalgames" or "totalcomments".
Example:
User Teddy has 10 totalgames( total game plays) and 5 totalcomments (comments posted) i want to script to count each game play for 5 points so 10 * 5 = 50 and each comment for 10 points so 5 * 10 = 50 and the total is 100 points :)
How do i do that ?
I know it sounds confusing but i have no idea how else to explain it :D
Thanks everyone in advance and if you have more questions please replay and i will check this forum every day.
:irritated:
Here is the script:
<?php
echo "<font>Current Rank<br><br></font>";
if ($user['totalgames'] > 0 && $user['totalgames'] < 10 ) {
echo "Keep Playing you noob.<br>";
}
elseif($user['totalgames'] > 10 && $user['totalgames'] < 20 ){
echo "You are a knight<br><br>";
}
elseif($user['totalgames'] > 20 && $user['totalgames'] < 50 ){
echo "You are a King<br><br>";
}
elseif($user['totalgames'] > 50 && $user['totalgames'] < 100 ){
echo "You are a noob :)<br><br>";
}
elseif($user['totalgames'] > 100 && $user['totalgames'] < 150 ){
echo "You are a noob :)<br><br>";
}
elseif($user['totalgames'] > 150 && $user['totalgames'] < 200 ){
echo "You are the man/woman :)<br><br>";
}
elseif($user['totalgames'] > 200 ){
echo "Holy Cow!!!<br><br>";
}
else {
echo "Error Retreaving Rank<br>";
}
echo "<br><br>";
?>
Thanks everyone in advance.


Sign In
Create Account

Back to top










