That was the first thing that I tried I'm afraid.. I found another code on the forums here:
<?php
/**********************************************\
| SMFSHOP (Shop MOD for Simple Machines Forum) |
| (c) 2006 DanSoft Australia |
| http://www.dansoftaustralia.net/ |
\**********************************************/
class item_PetCage extends itemTemplate {
function getItemDetails() {
$this->authorName = "The Great Orator";
$this->authorWeb = "http://www.dragontalk.net/";
$this->authorEmail = "admin@dragontalk.net";
$this->name = "Increase Pet Ownership";
$this->desc = "Increase Number of pets owned by xxx";
$this->price = 500;
$this->require_input = false;
$this->can_use_item = true;
}
// See 'AddToPostCount.php' for info on how this works
function getAddInput() {
return "Number of additional pets to allow: <input type='text' name='info1' value='5' />";
}
function getUseInput() {
return "";
}
function onUse() {
global $db_prefix, $ID_MEMBER, $item_info;
$MaxPets = db_query("SELECT maxpets
FROM {$db_prefix}members
WHERE ownerid = {$ID_MEMBER}",__FILE__, __LINE__);
$MaxPetsReached = mysql_fetch_assoc($result);
if ($MaxPetsReached != 10){
$result = db_query("UPDATE {$db_prefix}members
SET maxpets = maxpets + {$item_info[1]}
WHERE ownerid = {$ID_MEMBER}",__FILE__, __LINE__);
return "You can now own {$item_info[1]} additional pets!";
}
else{
return "You have too many pets already...."
}
}
}
?>
But it had something wrong with line 44