Nicholas Posted March 22, 2010 Posted March 22, 2010 scroll down to see how to do it. hi ive tho of a small modification on the estate.php file... i was thinking... how about we make it so it shows how much will the property gives but only if you own it... for example i tried this... You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. so on... depending on your property setup with house will. the 150 and 200 be different... but anyways then down where the table appears i would of put... <td>$will$will1$will2</td> so on with the $will? bit (its put together so it doesnt do like a space, not sure if im doing it right tho) if the player hasnt brought say the property with the 200 will it come up like this House Name | House Price | House Will | Buy? blah | $1,000 | 100 | BUY! blah | $2,500 | 150 | BUY! blah | $5,500 | ??? | BUY! that ??? means that they havnt yet brought that property, so they cant find out how much will the property gives until they have... hopefully its understandable... if someone can create this mod or help with the functions bit. that be great :) ______________________________________________________________________ also if you can... can you tell me how to make it so the property line doesnt disappear once you have brought the property. (if you know what i mean? lol) ______________________________________________________________________ Thanks, Nicholas. Quote
Lithium Posted March 23, 2010 Posted March 23, 2010 Showing all houses even those lower than you have... change this... $hq=$db->query("SELECT * FROM houses WHERE hWILL>{$ir['maxwill']} ORDER BY hWILL ASC"); to this $hq=$db->query("SELECT * FROM houses ORDER BY hWILL ASC"); Also if you want to display the house will... as in the default estate.php $r['hWILL'] will display the will on the house you're echoing on the while() Quote
Nicholas Posted March 23, 2010 Author Posted March 23, 2010 thanks lithium for that query edit, some reason im having loads trouble with selecting querys from the database lol, also i know how to show the house will for each house on the table, but im trying to make it so it doesnt show all of the house will at same time, you have to own the house before you can see how much will the house gives. if its understandable on what i mean lol. Quote
Joshua Posted March 23, 2010 Posted March 23, 2010 if($ir['maxwill'] = the house will) { echo "whatever the houses will or hell maxwill"; } else { echo " ??? "; } I think is what you're asking shrugz. Quote
Nicholas Posted March 23, 2010 Author Posted March 23, 2010 cant figure it out lol ive tried if($ir['maxwill'] == $mp['hWILL']) { $will = "{$mp['hWILL']}"; } else { $will = "???"; } <td>$will</td> but it just says 100 on all the slots then... Quote
Lithium Posted March 23, 2010 Posted March 23, 2010 ermmm.... that needs to be inside the while(). also, you can improve the code a bit... if($ir['maxwill'] == $mp['hWILL']) { $will = "{$mp['hWILL']}"; } else { $will = "???"; } can be $will = ($ir['maxwill'] == $mp['hWILL']) ? $mp['hWILL'] : "n/a"; yet this will not do what you wanted to... for what i understood, you want to "lock" will display on houses bigger than user's current house right? if so... $will = ($ir['maxwill'] > $mp['hWILL']) ? $mp['hWILL'] : "n/a"; Quote
Nicholas Posted March 23, 2010 Author Posted March 23, 2010 cheers :) You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. it works now :) Quote
Nicholas Posted March 23, 2010 Author Posted March 23, 2010 Lithium helped on this mod :) to do this, you need to find... You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. change it to this You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. then find... You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. under it put You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. then find... You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. change it to this... You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. (this is a better layout than the normal system...) if you already have a table around it. find this... You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. add next to the </td> You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. hopefully that should be clear to understand :/ Quote
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.