Jump to content
MakeWebGames

bank intrest %1


rigla

Recommended Posts

guys, how do i give bank intrest %1 to normal users and %2 for donators please?

i only see a line in 24h cron

$db->query("UPDATE users SET bankmoney=bankmoney+(bankmoney/50) where bankmoney>0");

what this should look like for %1 intrest? also where is the donator line or am im missing something?

sorry for my noobish questions

Link to comment
Share on other sites

Re: bank intrest %1

This is the code for 1% for normal users

 

$db->query("UPDATE users SET bankmoney=bankmoney+(bankmoney*0.01) WHERE bankmoney>0 AND donatordays=0");

 

This is the code for 2% for donators

 

$db->query("UPDATE users SET bankmoney=bankmoney+(bankmoney*0.02) WHERE bankmoney>0 AND donatordays>0");

 

I think that should work. What I did is use the multiplayer to do the percentage.

Link to comment
Share on other sites

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...