bennybwoi Posted July 22, 2010 Posted July 22, 2010 Hello i have nearly finished my donator gym for my game which will be open early next month, but i am stuck on how to give the user exp each time they train. If someone could please post the code/formula below i would be very greatful. Thank BennyBwoi. Quote
Djkanna Posted July 23, 2010 Posted July 23, 2010 Percentage exp or strict number? Percentage (2%) $expUpdate = $ir['exp'] + (($ir['exp']/100)*2); $db->query("UPDATE `users` SET `exp` = ".$expUpdate." WHERE(`userid` = ".$userid.")"); Exact Number (5) $db->query("UPDATE `users` SET `exp` = `exp` + 5 WHERE(`userid` = ".$userid.")"); Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.