Hendrickson Posted October 31, 2011 Share Posted October 31, 2011 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. Quote Link to comment Share on other sites More sharing options...
chicka Posted October 31, 2011 Share Posted October 31, 2011 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. Quote Link to comment Share on other sites More sharing options...
gurpreet Posted October 31, 2011 Share Posted October 31, 2011 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? Quote Link to comment Share on other sites More sharing options...
chicka Posted October 31, 2011 Share Posted October 31, 2011 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 Quote Link to comment Share on other sites More sharing options...
gurpreet Posted October 31, 2011 Share Posted October 31, 2011 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."); } Quote Link to comment Share on other sites More sharing options...
chicka Posted October 31, 2011 Share Posted October 31, 2011 Indeed. I misread what he was asking for. gurpreet is correct. All you have to do now is edit your cron_day file and you should be good to go.. Quote Link to comment Share on other sites More sharing options...
Hendrickson Posted October 31, 2011 Author Share Posted October 31, 2011 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. Quote Link to comment Share on other sites More sharing options...
gurpreet Posted October 31, 2011 Share Posted October 31, 2011 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"); Quote Link to comment Share on other sites More sharing options...
newttster Posted October 31, 2011 Share Posted October 31, 2011 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"); Quote Link to comment Share on other sites More sharing options...
gurpreet Posted October 31, 2011 Share Posted October 31, 2011 What do you mean by: 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. Quote Link to comment Share on other sites More sharing options...
chicka Posted October 31, 2011 Share Posted October 31, 2011 (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 October 31, 2011 by chicka Quote Link to comment Share on other sites More sharing options...
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.