Jump to content
MakeWebGames

Paid mod. Limit donator and normal bank account interest


Hendrickson

Recommended Posts

What your looking for is VERY simple and its probably something you can do your self.

In your day cron, look for the query that gives bank interest and edit it to suit your needs..

in your bank.php file you dont' really have to do anything except edit the part that tells players how much interest they will gain.

Link to comment
Share on other sites

Wouldn't he also need to add some checks in the bank.php file to check if the deposit amount exceeds the cap he set?

Yes he could so something like this

function deposit()
{
global $db,$ir,$c,$userid,$h;
$_POST['deposit']=abs(@intval($_POST['deposit']));
if($_POST['deposit'] > 2000000000)
{
echo "your max deposit is 2 billion";
$h->endpage();
exit;
}
else
Link to comment
Share on other sites

That's a simple edit as chicka said, and it is just editing your cron_day. Find your queries to update bank interest and just add a where like this:

$db->query("UPDATE users SET bankmoney=bankmoney+(bankmoney/100*2) WHERE bankmoney>0 AND bankmoney<20000000");

On your last amount would you not have to set that to include the interest given for one time ... otherwise they would never get the interest. Right?

If your interest is 1% then

$db->query("UPDATE users SET bankmoney=bankmoney+(bankmoney/100*2) WHERE bankmoney>0 AND bankmoney<20200000");

Link to comment
Share on other sites

I could be wrong but I believe what he wants is for the players to be able to deposit as much as they want how ever if they go over (example) 2billion they get no interest but if they have less then 2b they get interest to a max of 2bil??

if thats the case then gerpreet is right.

Sorry SomeRandomBastard didn't see your post before I posted this.. I believe that query will work for what he is looking for

Edited by chicka
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...