Re: Finding items
//-- Finding items query
$fia=(int) rand(10000,50000);
$fib=(int) rand(10000,50000);
if($fia == $fib)
{
$iq=$db->query("SELECT * FROM items WHERE itmbuyable=1 ORDER BY rand() LIMIT 1",$c);
$r=mysql_fetch_array($iq);
$item=$r['itmid'];
$userid=$ir['userid'];
$db->query("INSERT INTO inventory VALUES ('', $item, $userid, 1)",$c);
event_add($userid,"You found a {$r['itmname']} While Walking Around the city.",$c);
}
}
Try that.