Jump to content
MakeWebGames

Getting Rid of the 2.147 bil cap in MCcode


Arson

Recommended Posts

To get rid of the 2.147 bil cap in scripts such as the sendcash.php , locate at the top of the script

$_GET['money']=abs((INT)$_GET['money']);

 

and change it to

$_GET['money']=abs(strip_tags(($_GET['money'])));

 

That will make whatever they put in into an absolute number. It blocks the 2.20,E+102 exploit, and keeps them from putting negative numbers in the send cash field. Along with blocking any scripting that they may ever so 'cleverly' attempt to put in the form.

Link to comment
Share on other sites

  • 2 weeks later...

Re: Getting Rid of the 2.147 bil cap in MCcode

hi i would like to take of the cap on the game because i can only have a max priced house a player can only hold a max amount of cash and there stats they can only have as a max any help on witch files i need to help would be apricated

Link to comment
Share on other sites

Re: Getting Rid of the 2.147 bil cap in MCcode

 

hi i would like to take of the cap on the game because i can only have a max priced house a player can only hold a max amount of cash and there stats they can only have as a max any help on witch files i need to help would be apricated

This guy's got it right

 

this may be misleading to some as if money is INT(11) it's still gonna be capped at 2.14...bil being a function of the sql type & size -yes?

Change the field to a bigint and you should be ok for a while.

Link to comment
Share on other sites

Re: Getting Rid of the 2.147 bil cap in MCcode

 

hi i would like to take of the cap on the game because i can only have a max priced house a player can only hold a max amount of cash and there stats they can only have as a max any help on witch files i need to help would be apricated

This guy's got it right

 

this may be misleading to some as if money is INT(11) it's still gonna be capped at 2.14...bil being a function of the sql type & size -yes?

Change the field to a bigint and you should be ok for a while.

 

after reading this i am more lost lol has it got any relavence to my question lol soz was that an answer on how to do it im dumbs lol nah, if you can help me what files do i nead to edit ty?

Link to comment
Share on other sites

Re: Getting Rid of the 2.147 bil cap in MCcode

umm ok

You need to modify your Database to allow a bigger number to go into that field. From your responses, this might be too hard for you to understand and do though :(

Best idea: find someone you trust that knows what we're talking about to do it.

 

ALTER TABLE tablename MODIFY columnname BIGINT NOT NULL;

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

Re: Getting Rid of the 2.147 bil cap in MCcode

 

to remove the 2.147 bil cap

ALTER TABLE `users` ADD `money` BIGINT( 45 ) UNSIGNED NOT NULL ;

unsigned means it's normal flow cash, no repeat in 2.147 rows if you get me.

i get this when i try to run it

#1060 - Duplicate column name 'money'

Link to comment
Share on other sites

  • 2 weeks later...

Re: Getting Rid of the 2.147 bil cap in MCcode

Goto PHP MyAdmin and goto the mySQL database which you games SQL is written in and goto table 'users'.

Edit the type catagory of level, money, christals (and any other things you want to take the 2.1 bill cap off) from 'INT' to 'BIGINT' . :-D

Link to comment
Share on other sites

Re: Getting Rid of the 2.147 bil cap in MCcode

bigint

Integer (whole number) -9,223,372,036,854,775,808 through 9,223,372,036,854,775,807 (with default attributes setting)

Set the attributes to unsigned and it changes this to a range of 0 through 18,446,744,073,709,551,614

Link to comment
Share on other sites

Re: Getting Rid of the 2.147 bil cap in MCcode

first of all why do you guys allow so much money going into the players banks, hand etc. Its stupid. Cut the money down a bit. When you first join most games start with $200-$1000 cash. Then when players see another player 7 days old they have over 3 million.

Why? Why? Why?

Its stupid.

Link to comment
Share on other sites

Re: Getting Rid of the 2.147 bil cap in MCcode

 

first of all why do you guys allow so much money going into the players banks, hand etc. Its stupid. Cut the money down a bit. When you first join most games start with $200-$1000 cash. Then when players see another player 7 days old they have over 3 million.

Why? Why? Why?

Its stupid.

Well I'm not a game owner so I can't really give you a reason why, but I can speculate that over time it does become necceasry to go beyond the 2.xx billion limit.

Link to comment
Share on other sites

  • 1 month later...

Re: Getting Rid of the 2.147 bil cap in MCcode

Well this way i have done works fine for me in admin panel were it has edit , create user, credit users ect in the code some think like (int) replace that with (float) works fine and edit the money table and it should work works fine for me :-P

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