Jump to content
MakeWebGames

Recommended Posts

Posted

I'm looking for someone to help me add a interest limit / cap to the donator and normal bank account.

Also limit the amount each bank can hold.

Note: No cpanel / ftp access will be given. So don't ask. Required files will be given. Anything need to be run in mysql will be done by myself.

Posted

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.

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

I think he means the total a user can have in their bank must be set. Something like this:

 

if(($_POST['deposit'] + $ir['bankmoney']) > 1000000000)
{
die("Your requested deposit exceeds the maximum amount allowed.");
}
Posted

Thanks, sorry I was not clear in my post. I meant a bank limit on accountsand not just editing the cron day job to lower interest rates. That I know. But to cap interest gained. In order to stop users accounts running away with interest unbalancing the economy.

Posted

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

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

Posted (edited)

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

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