Once made the same for phoenixphp. Deleted it yesterday lol.
Maybe you should implent MUS so coins are immediatly taken when buying one. Now there is a chance people can get one for free.
Printable View
Once made the same for phoenixphp. Deleted it yesterday lol.
Maybe you should implent MUS so coins are immediatly taken when buying one. Now there is a chance people can get one for free.
Thanks, i can use this! :w00t:
The code dont work right on habbo theme it may not work right at all because if you put 2 limited rares one has 100 out and the other has 60 out it will make them both say 100 and after you buy one in the database it makes them both 100 but this is messing with the database and giving free rares. MUS should be added if you can do that real fast that would help with the free rares and the limit thing idk you should try to find that out. Also this is a awesome release for phoenix users really good!
okay ill tell you what errors i see so you can find out better thanks
Very messy omg!
Please big hotels with 100+ online tell me if you use this plzplz!! :love:
Replace the code in the buyltd.php page with this :
That will fix the problem.Code:<?php
$ltd_id = preg_replace('/[^0-9]/', '', $_POST["ltd_id"]);
$user_id = $_SESSION['user']['id'];
$selectfromusers = mysql_query("SELECT * FROM users WHERE id = '".$user_id."'") or die(mysql_error());
$getmoney = mysql_fetch_array($selectfromusers);
$money_current = $getmoney['credits'];
$selectfromfurninum = mysql_query("SELECT * FROM rev_ltd WHERE furni_id = '".$ltd_id."'") or die(mysql_error());
$getfurninum = mysql_fetch_array($selectfromfurninum);
$furnileft = $getfurninum['furni_left'];
$furnisold = $getfurninum['furni_sold'];
$ltd_price = $getfurninum['furni_price'];
if($furnileft > '0')
{
if($money_current < $ltd_price)
{
echo "You don't have enough money for this item";
}
else
{
$newmoney = $money_current - $ltd_price;
mysql_query("UPDATE users SET credits='".$newmoney."' WHERE id='".$user_id."'") or die(mysql_error());
$newfurnileft = $furnileft - '1';
$newfurnisold = $furnisold + '1';
mysql_query("UPDATE rev_ltd SET furni_sold='".$newfurnisold."' WHERE furni_id = '".$ltd_id."'") or die(mysql_error());
mysql_query("UPDATE rev_ltd SET furni_left='".$newfurnileft."' WHERE furni_id = '".$ltd_id."'") or die(mysql_error());
$highestid = mysql_query("SELECT * from items ORDER BY id DESC LIMIT 1") or die(mysql_error());
$checknewid2 = mysql_fetch_array($highestid);
$newid2 = $checknewid2['id'];
$newid = $newid2 + '1';
mysql_query("INSERT INTO items (id, user_id, room_id, base_item, extra_data, x, y, z, rot, wall_pos) VALUES ('".$newid."','".$user_id."',0,'".$ltd_id."',0,0,0,0,0,0)") or die(mysql_error());
echo "Item bough successfully!";
}
}
else
{
echo "All of furniture is already sold, sorry";
}
?>
<meta http-equiv="refresh" content="1; URL=me">
now a new problem really bad that you cant even use this it buys the item but makes phoenix have the duplication error so you gotta work on that the most.
Hello, i followed corectly everything but, when i press "Buy" and after it goes to buyltd.php page, i get this ERROR (See Below). How can i fix it ?
ERROR:
Code:Unknown column 'id' in 'order clause'