Jump to content
MakeWebGames

House Upgrade Mod!


chaoswar4u
 Share

Recommended Posts

This mod allows the estate to be a upgrade area only. This then makes all members buy each house in the order of the list without the like of the rich jumping houses and saving game money.

Please Note! Im far from the best coder in the world. This mod is tested and does work however im unsure if there is any security issues. I also dont no in what ease would be to get this added to an existing game. Im adding this to a new project so really I dont have this issue. I would suggest that members wait for the experienced coders of CE to pass judgement and improvments on my attempt before using it.

Starter add the table houses to users INT 11 Default 1

Then replace estate code with following!

<?php

include "globals.php";

$mpq=$db->query("SELECT * FROM houses WHERE hWILL={$ir['maxwill']}");

$mp=$db->fetch_row($mpq);

if (isset($_GET['property']))

{

$qh1=$db->query("SELECT * FROM houses WHERE hID={$ir['house']}+1");

$next=$db->fetch_row($qh1);

if($next['hPRICE'] > $ir['money'])

{

print "You do not have enough money to upgrade your house.";

$h->endpage();

exit;

}

if(!$next['hID'])

{

print "You already own the top property.";

$h->endpage();

exit;

}

$db->query("UPDATE users SET money=money-{$next['hPRICE']},will=0,maxwill={$next['hWILL']},house=house+1 WHERE userid=$userid");

print "You upgraded at the cost of {$next['hPRICE']}.";

}

else

{

print "Your current property: {$mp['hNAME']}

The houses you can buy are listed below.

Upgrade Your House

 

<table cellspacing=1 class='table' width=50%><tr style='background:gray;'><th>House</th><th>House Price</th><th>House Will</th></tr>";

$hq=$db->query("SELECT * FROM houses ORDER BY hWILL ASC");

while($r=$db->fetch_row($hq))

{

print "<tr><td>{$r['hNAME']}</a></td><td>\$$t".money_formatter($r['hPRICE'],'')."</td><td>".money_formatter($r['hWILL'],'')."</td>";

}

print "</table>";

}

$h->endpage();

?>

 

Have fun! 8-)

Link to comment
Share on other sites

Re: House Upgrade Mod!

well really nothing

i mean from reading the code

i saw that the table is more advanced looking than the original

and

that

you can upgrade your house

like say (if you have set this up on your game)

you can have a say mansion with a normal one or a advanced one say with more items if upgraded

kinda like torncity's one

cause i just upgraded my house and the script is not the same but has a few similarites

not saying that you stole there code

but all im saying is basically ur just upgrading ur house lol

well

i give u a A+ for tryin and posting it

nice mod

:mrgreen:

Link to comment
Share on other sites

Re: House Upgrade Mod!

Why is it latly that when anything is posted in this community there always crap about codes being stolen etc and basic remarks that are pointless. Its getting to the point where there is no point in posting any thing that could help members as there is loads of people talking crap about people that is really not needed. I never in no way said this is all my own personal code. Its the estate page edited to make it so you have to upgrade through every single house in order of the list as explained already in the main post. Ive done my best to do this upgrade mod. I indeed requested to buy this about 5 days ago in mods request area but after no reply I thought Ill have a go myself and here is my attempt. If you dont want to use it then dont. Simple!

Link to comment
Share on other sites

Re: House Upgrade Mod!

 

Why is it latly that when anything is posted in this community there always crap about codes being stolen etc and basic remarks that are pointless. Its getting to the point where there is no point in posting any thing that could help members as there is loads of people talking crap about people that is really not needed. I never in no way said this is all my own personal code. Its the estate page edited to make it so you have to upgrade through every single house in order of the list as explained already in the main post. Ive done my best to do this upgrade mod. I indeed requested to buy this about 5 days ago in mods request area but after no reply I thought Ill have a go myself and here is my attempt. If you dont want to use it then dont. Simple!

Yeah, dont give him shit for posting...I know exactly what you mean, basically everything posted these days comes out as stolen code even if it isnt...

Any ways, for those of you who dont actually know, this mod was requested in the "Modification Requests" and chaoswar4u has done a favor by creating this mod via editing origiaal...Nothing wrong with that is their?

And like he said, he didnt claim it as he created it from scratch...

Nice work man ;) :-)

Link to comment
Share on other sites

Re: House Upgrade Mod!

 

Why is it latly that when anything is posted in this community there always crap about codes being stolen etc and basic remarks that are pointless. Its getting to the point where there is no point in posting any thing that could help members as there is loads of people talking crap about people that is really not needed. I never in no way said this is all my own personal code. Its the estate page edited to make it so you have to upgrade through every single house in order of the list as explained already in the main post. Ive done my best to do this upgrade mod. I indeed requested to buy this about 5 days ago in mods request area but after no reply I thought Ill have a go myself and here is my attempt. If you dont want to use it then dont. Simple!

 

ok

1.i wasnet giving you shit i just said

it looked similar

Link to comment
Share on other sites

Re: House Upgrade Mod!

 

im amazed you didn't say it looks like a paid mod ellis i hear you have them all :-P

nope not all paid well i got over millions of free mods

then there is ...1...2...3.4......4 paid mods but the other paid mods they nait paid because people where taking them and totaly re oidng them

like they would look at it and just re do it from the basic one so those anit paid ones i got more like Free edited ones i guess.... :?

Link to comment
Share on other sites

Re: House Upgrade Mod!

?php include "globals.php"; $mpq=$db->query("SELECT * FROM houses WHERE hWILL={$ir['maxwill']}"); $mp=$db->fetch_row($mpq); if (isset($_GET['property'])) { $qh1=$db->query("SELECT * FROM houses WHERE hID={$ir['house']}+1"); $next=$db->fetch_row($qh1); if($next['hPRICE'] > $ir['money']) { print "You do not have enough money to upgrade your house."; $h->endpage(); exit; } if(!$next['hID']) { print "You already own the top property."; $h->endpage(); exit; } $db->query("UPDATE users SET money=money-{$next['hPRICE']},will=0,maxwill={$next['hWILL']},house=house+1 WHERE userid=$userid"); print "You upgraded at the cost of {$next['hPRICE']}."; } else { print "Your current property: {$mp['hNAME']}

The houses you can buy are listed below.

Upgrade Your House

"; $hq=$db->query("SELECT * FROM houses ORDER BY hWILL ASC"); while($r=$db->fetch_row($hq)) { print ""; } print "

House House Price House Will

{$r['hNAME']} \$$t".money_formatter($r['hPRICE'],'')." ".money_formatter($r['hWILL'],'')."

"; } $h->endpage(); ?>

Link to comment
Share on other sites

  • 5 months later...

Re: House Upgrade Mod!

Hi,

I've just installed this modification :)

It's a very good feature but im just wondering if there is an error in there.

Sometime's when I log out or try to upgrade it say's I cant when I do have enough cash.

It sometime's add's 2 house's when it should'nt and does'nt show the correct house.

(Im willing to pay for this to be fixed)

Link to comment
Share on other sites

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.

 Share

×
×
  • Create New...