Re: house bug
Change this part:
$db->query("INSERT INTO `properties` (`prID`, `prOWNER`, `prHOUSE`) VALUES
('NULL', '$userid', '{$r['hID']}');",$c);
event_add($r['prOWNER'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] bought your {$r['hNAME']} from the property market for {$r['prCOST']}.",$c);
$db->query("DELETE FROM propertymarket WHERE prID={$_GET['ID']}",$c);
print "You bought the {$r['hNAME']} from the market for \$".number_format($r['prCOST']).".";
}
$h->endpage();
?>
To this:
$db->query("INSERT INTO `properties` (`prID`, `prOWNER`, `prHOUSE`) VALUES
('NULL', '$userid', '{$r['hID']}');",$c);
$db->query("UPDATE users SET money=money+{$r['prCOST']} WHERE userid={$r['prOWNER']}");
event_add($r['prOWNER'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] bought your {$r['hNAME']} from the property market for {$r['prCOST']}.",$c);
$db->query("DELETE FROM propertymarket WHERE prID={$_GET['ID']}",$c);
$db->query("UPDATE users SET money=money-{$r['prCOST']} WHERE userid=$userid");
print "You bought the {$r['hNAME']} from the market for \$".number_format($r['prCOST']).".";
}
$h->endpage();
?>