Jump to content
MakeWebGames

Recommended Posts

Posted

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.

Posted

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()

Posted

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.

Posted

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...

Posted

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";

Posted

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 :/

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...