weewooz Posted June 28, 2009 Share Posted June 28, 2009 sorry to post ere ive in help but no answer how do i set so that you have to be a certain level to buy a house ive imported sql with i think is right but what would i put in estate page ive been serached and one topic but it dont work any help thanks alot again sorry to post here Quote Link to comment Share on other sites More sharing options...
Lithium Posted June 28, 2009 Share Posted June 28, 2009 Re: Buy House with level my 2 cents... It is not in 20 minutes that someone will answer you. 3 posts about the exact same thing is just one step to no one helping you out. As of your first post about this, IF you read the entire thread instead skipping posts, you'd make it working. Quote Link to comment Share on other sites More sharing options...
Pieces Posted June 28, 2009 Share Posted June 28, 2009 Re: Buy House with level I understood a small minority of your post... Quote Link to comment Share on other sites More sharing options...
weewooz Posted July 13, 2009 Author Share Posted July 13, 2009 Re: Buy House with level i mean that you cant buy a certain house to you are the required level the level is what admin will set in php Quote Link to comment Share on other sites More sharing options...
Guest Sniko` Posted July 13, 2009 Share Posted July 13, 2009 Re: Buy House with level Open up staff_houses.php and find print "<h3>Add House</h3><hr /> <form action='staff_houses.php?action=addhouse' method='post'> Name: <input type='text' name='name' /> Price: <input type='text' name='price' /> Max Will: <input type='text' name='will' /> <input type='submit' value='Add House' /></form>"; Replace with print "<h3>Add House</h3><hr /> <form action='staff_houses.php?action=addhouse' method='post'> Name: <input type='text' name='name' /> Price: <input type='text' name='price' /> Max Will: <input type='text' name='will' /> Level: <input type='text' name='level' /> <input type='submit' value='Add House' /></form>"; Now find global $db, $ir, $c, $h, $userid; $price=abs((int) $_POST['price']); $will=abs((int) $_POST['will']); $name=$_POST['name']; if($price and $will and $name) Replace with global $db, $ir, $c, $h, $userid; $price=abs((int) $_POST['price']); $will=abs((int) $_POST['will']); $name=$_POST['name']; $lvl=$_POST['level']; if($price and $will and $name) Now find $db->query("INSERT INTO houses VALUES(NULL, '$name', '$price', '$will')"); Replace with $db->query("INSERT INTO houses VALUES(NULL, '$name', '$price', '$will', '$lvl')"); Now go to estate.php find $hq=$db->query("SELECT * FROM houses WHERE hWILL>{$ir['maxwill']} ORDER BY hWILL ASC"); Replace with $hq=$db->query("SELECT * FROM houses WHERE hWILL>{$ir['maxwill']} AND hLVL < {$ir['level']} ORDER BY hWILL ASC"); SQL ALTER TABLE houses ADD hLVL INT(11) DEFAULT 1; UNTESTED BUT SHOULD WORK POST ANY BUGS Thanks Sniko Quote Link to comment Share on other sites More sharing options...
weewooz Posted July 13, 2009 Author Share Posted July 13, 2009 Re: Buy House with level ty sniko will try now mate Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.