View Single Post
  #4  
Old 04-18-2009, 11:48 AM
BMR777 BMR777 is offline
Member
 
Join Date: Jan 2011
Posts: 1,122
Gender: Male
Credits: 16,993
BMR777 is on a distinguished road
Default RE: Freezing and limiting adoptables

Look in functions.php, at the canadopt function.

If you wanted to make it where users can only adopt a certain number of this type of pet, however frozen ones of this type do not count, in functions.php you would find:

PHP Code:
if($morethannumberen == "enabled"){

    
$num 0;

    
$query "SELECT * FROM ".$prefix."owned_adoptables WHERE owner='$loggedinname' and type='$type'";
    
$result mysql_query($query);
    
$num mysql_numrows($result);

    if(
$num $morethannumber){

    
$canadopt "no";


    }


    } 
// End morethannumberen check 
Replace:

PHP Code:
$query "SELECT * FROM ".$prefix."owned_adoptables WHERE owner='$loggedinname' and type='$type'"
With:

PHP Code:
$query "SELECT * FROM ".$prefix."owned_adoptables WHERE owner='$loggedinname' and type='$type' and isfrozen='no'"
That will only count adoptables of that type that are NOT frozen. :)

Brandon
Reply With Quote