Jump to content
MakeWebGames

Little crystal cap thing.


gurpreet

Recommended Posts

Here's a little mod, just a cap, I do NOT take credit as it was given to me by someone who I forgot... :roll:

Open up cmarket.php and find

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

Under that add

print "> Add A Listing (price limit is $10,000 each)

 

Change the $10,000 to however much you want the cap to be.

Next find

function crystal_add()

{

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

$_POST['amnt'] = abs((int) $_POST['amnt']);

$_POST['price'] = abs((int) $_POST['price']);

if($_POST['amnt'])

{

if($_POST['amnt'] > $ir['crystals'])

{

die ("You are trying to add more crystals to the market than you have.

> Back");

}

And underneath add

else if ( $_POST['price'] > 10000 )

{

die ("The maximum you can charge for crystals is $10,000 each

> Back");

}

And again change the ( $_POST['price'] > 10000 ) from 10000 to whatever you want.

 

This is my 1st mod post so please say if this helped.

Here's some screenies.

11rg9zd.jpg

20sewd5.jpg

Link to comment
Share on other sites

Re: Little crystal cap thing.

I think this is great but i did a little add to it, What that is it sends an event to the owner saying that this person was trying to post crystals higher then the cap, I will post both the versions first i post the one you did then i will post the add to it, I'm sorry if you get upset or angry i am just trying to help make it easier, Also this add is for v2 but to make it for v1 simply take $db, out of this part of the code.

You're unable to view this code.

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

 

 

 

You're unable to view this code.

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

 

 

change that to this

 

You're unable to view this code.

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

 

 

Let me know if it don't work.

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