Jump to content
MakeWebGames

Recommended Posts

Posted

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.

Posted

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.")");

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...