View Single Post
  #4  
Old 02-02-2009, 03:58 PM
BMR777 BMR777 is offline
Member
 
Join Date: Jan 2011
Posts: 1,122
Gender: Male
Credits: 10,853
BMR777 is on a distinguished road
Default RE: Limit Pets per user

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:

PHP Code:
$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.

PHP Code:
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
Reply With Quote