Jump to content
MakeWebGames

Recommended Posts

Posted

I thought I'd make a bank for donators only. It's a very basic mod of cyberbank but I thought you guys might want something like this.

Create file called donatorbank.php

In that, add...

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Then run this SQL query

ALTER TABLE `users` ADD `donatorbank` INT NOT NULL DEFAULT '0';

 

Now place this into your Cron_day.php where other db query's are.

 

$db->query("UPDATE users SET donatormoney=donatormoney+(donatormoney/100*20) where donatormoney>0");

 

I think that is it, You can change the interest by changing (donatormoney/100*[interest goes here]).

Also you can change fees by finding $fees in the codes.

 

I hope you enjoy this, as it took me all of 10 minutes to make =P

 

Oh, one last thing:- Edit explore.php and find...

 

if($ir['location'] == 5)

{

print "

 

Cyber Bank

";

}

 

Under that put

 

if($ir['donatordays'] > 0)

{

print "

 

Donator's Bank

";

}

 

And that is it, I havn't tested this yet so please post any problems/things I may have missed.

Thanks =D.

Posted

Re: Donator's Bank[MCV2]

This is a good idea, there were a few typos and missing. This should work better but still be buggy:

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

The query was wrong too, should be:

ALTER TABLE `users` ADD `donatormoney` INT(11) NOT NULL DEFAULT '-1';

I also added in staff_users.php:

look for:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

and under add

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

but I am no pro here just throwing out my 2 cents, seems to work OK on my game, not sure about the cron, but it looks alright

Posted

Re: Donator's Bank[MCV2]

Congratulations, you bought a bank account for $10,000!

Start using my accountQUERY ERROR: Unknown column 'donatormoney' in 'field list'

Query was UPDATE users SET money=money-10000,donatormoney=0 WHERE userid=1

Posted

Re: Donator's Bank[MCV2]

For V.1 :-D

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

There might be a few snags but they will be easy to fix!

Posted

Re: Donator's Bank[MCV2]

So far I haven't posted any mods that I want to be taken seriously :-P. I code as a pastime not a method of income. I haven't offered any of the mods that I wanted to be taken seriously for sale yet; I'd rather have more for sale at once.

  • 4 months later...
Posted

Re: Donator's Bank[MCV2]

 

Congratulations, you bought a bank account for $10,000!

Start using my accountQUERY ERROR: Unknown column 'donatormoney' in 'field list'

Query was UPDATE users SET money=money-10000,donatormoney=0 WHERE userid=1

maybe thats cause his sql is wrong.

he posted:

ALTER TABLE `users` ADD `donatorbank` INT NOT NULL DEFAULT '0';

when it's

ALTER TABLE `users` ADD `donatormoney` INT NOT NULL DEFAULT '0';

  • 8 months later...
Posted

Re: [mccode v2] Donator's Bank

Pop.

Bringing an old topic back just to ask about it.

I have wanted a donator bank and thought this seemed great.

I have installed it and not at all altered it.

I get this message when I click on the bank :

Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE or '$' in /home/******/public_html/donatorbank.php on line 82

Which is :

global db,$ir,$c,$userid,$h;

What should it be?

Thank you to anyone who can help.

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