PDA

View Full Version : Limit Pets per user


Seapyramid
02-02-2009, 01:58 AM
First Thank You! This script is a great starting point!

There are a number of modifications I would like to do, but thankfully most can wait a bit & be implemented slowly over time. I would however like to be able to limit users on the number of "growing" pets at one time they can have. Would you be able to help me with this?

I currently have 6 stages of growth. I would like to limit the number of pets a user has on stages 1-4 to 5 pets max at any time. Stages 5 & up would not count in this limit.

Any help on this would be greatly appreciated. :)

Thanks, Sea

BMR777
02-02-2009, 04:35 PM
I'll have to see if Johnathon can add this to the next release, which is due out in a week or two. I'm rather hesitant to make any major changes to the current version as most of it will be rewritten with the new release.

Otherwise if it is not in the new release then once the new release comes out then I can add this in. :)

Brandon

Seapyramid
02-02-2009, 04:50 PM
Thank you so much!!! :)

Sea

BMR777
02-02-2009, 04:58 PM
Ok, quick down and dirty solution here, in case you can't wait... :)

Download the attached adopt.php and then replace the one on your site with the attached file.

The attached file by default will make it so a user cannot have more than 4 pets with levels less than 6. To change these values, open the file in wordpad or another text editor and change:

$query = "SELECT * FROM owned_adoptables WHERE currentlevel < '6' and owner='".$username."'";

Change the number 6 here to the level where adoptables must be to be considered adult and do not count against the user's total.

if($num >= 4){

Change the number 4 here to be the maximum number of young adoptables a user can have before the system denies them new pets. :)

I haven't tested this file but it should work. Let me know how it works. :)

Brandon

Seapyramid
02-02-2009, 06:01 PM
*hugs*

That works wonderfully!!!!!! Thank you! Thank you! Thank You!

Sea

agnyz
02-02-2009, 11:51 PM
Damn you guys amaze me, I have watched and almost every time someone has asked for something special you guys have delivered.

Any chance i could get you guys to fix a myspace friend adder script that doesn't show the pictures for people signing up with the profile 2?

I bought the damn thing for 25 bucks and thier support sucks, I told them about it a month ago and they said they would work on it and that was the last I Heard.

lol I don't really expect you guys to fix that one, just wanted to point out how good the support is on this site.

Thanks guys.