Jump to content
MakeWebGames

HOUSE TAX!!!!


DJ Rankin
 Share

Recommended Posts

Hi i need this mod to take money out of the bank if you dont have it in hand and if you dont have it in hand you lose your house

 

<?php
include "mysql.php";
global $c;
include "global_func.php";

//House Tax Update
$uq=mysql_query("SELECT * FROM users");
$Row=0;
while($r=mysql_fetch_array($uq))
{
$will = $r['maxwill'];
$hq=mysql_query("SELECT * FROM houses WHERE hWILL='{$will}'");
if(mysql_num_rows($hq) == 0)
{ }
$r2=mysql_fetch_array($hq);
if($r['money'] < $r2['hTAX'])
{ $money=$r['money'];
event_add($r['userid'],"You failed to pay the tax, so you have lost the house.",$c);
mysql_query("UPDATE users SET money=money+{$r2['hPRICE']}, maxwill=100 WHERE userid={$r['userid']}");
} else {
mysql_query("UPDATE users SET money=money-'{$r2['hTAX']}' WHERE userid='{$r['userid']}'");
}
$Rows++;
}
?>
Totally there were <?php print($Rows); ?> rows which were executed.
Link to comment
Share on other sites

Re: HOUSE TAX!!!!

 

well code it then

Your attitude and how you talk to people you hope will help you sucks.

I could and would have done this until i scrolled down to that message.

Now all i have to say is:

Do it yourself

Thats exactly how i thought.

 

well code it then

I was going to do it i was just about to copy the code to edit it until i seen this message.

This is why i dont come on much more!

Im going soon so i am sure you didnt mean it to sound like you did therefore i will forgive you.

Just make sure you say sorry in your next post!

 

<?php
include "mysql.php";
global $c;
include "global_func.php";

//House Tax Update
$uq=mysql_query("SELECT * FROM users");
$Row=0;
while($r=mysql_fetch_array($uq))
{
$will = $r['maxwill'];
$hq=mysql_query("SELECT * FROM houses WHERE hWILL='{$will}'");
if(mysql_num_rows($hq) == 0)
{ }
$r2=mysql_fetch_array($hq);
$ymny=$r['money']+$r['bankmoney'];
if($ymny < $r2['hTAX'])
{ $money=$r['money'];
event_add($r['userid'],"You failed to pay the house tax, so you have lost your house.",$c);
mysql_query("UPDATE users SET money=money+{$r2['hPRICE']}, maxwill=100, willmax=100, will=100 WHERE userid={$r['userid']}");

} else {
mysql_query("UPDATE users SET bankmoney=bankmoney+'{$ir['money']}' WHERE userid='{$r['userid']}'");
mysql_query("UPDATE users SET bankmoney=bankmoney-'{$r2['hTAX']}' WHERE userid='{$r['userid']}'");
event_add($r['userid'],"We banked your money and at the same time took the house tax you owe us.",$c);
}
$Rows++;
}
?>
Totally there were <?php print($Rows); ?> rows which were executed.

 

that should work

Link to comment
Share on other sites

Re: HOUSE TAX!!!!

no, its adding the money from the hand into the bank and then taking it from the bank.

So tax is 5000, in hand they have 3000 and 2000 in bank, it puts the 3000 in the bank and takes it away with the 2000 origionaly in the bank.

or if tax is 5000, hand has 6000, bank 2000, it still banks all the hand money and then takes 5000 from the bank. this is the only way i could do it lol

also, i dont see any sorry for your rude post

Link to comment
Share on other sites

Re: HOUSE TAX!!!!

 

k sorry for that rude post truly sorry but i want the house tax to take it out of the bank if you dont have it in hand and if you have it in hand it takes that

Thats more like it. thankyou!

I havent coded much for a while, so i dont think i can do that lol. cant you live with it?

EDIT:

<?php
include "mysql.php";
global $c;
include "global_func.php";

//House Tax Update
$uq=mysql_query("SELECT * FROM users");
$Row=0;
while($r=mysql_fetch_array($uq))
{
$will = $r['maxwill'];
$hq=mysql_query("SELECT * FROM houses WHERE hWILL='{$will}'");
if(mysql_num_rows($hq) == 0)
{ }
$r2=mysql_fetch_array($hq);
$ymny=$r['money']+$r['bankmoney'];
if($r['bankmoney'] < $r2['hTAX'] AND $r['money'] < $r2['hTAX'])
{ $money=$r['money'];
event_add($r['userid'],"You failed to pay the house tax, so you have lost your house.",$c);
mysql_query("UPDATE users SET money=money+{$r2['hPRICE']}, maxwill=100, willmax=100, will=100 WHERE userid={$r['userid']}");

}
}
if($r['bankmoney'] > $r2['hTAX'])
{ 
mysql_query("UPDATE users SET bankmoney=bankmoney-'{$r2['hTAX']}' WHERE userid='{$r['userid']}'");
event_add($r['userid'],"We have taken the house tax from your bank.",$c);
} else if($r['money'] > $r2['hTAX'])
{ 
mysql_query("UPDATE users SET money=money-'{$r2['hTAX']}' WHERE userid='{$r['userid']}'");
event_add($r['userid'],"We have taken the house tax from your money.",$c);
}
$Rows++;
}
?>
Totally there were <?php print($Rows); ?> rows which were executed.

 

try that, if it doesnt work then tell me the error

Link to comment
Share on other sites

Re: HOUSE TAX!!!!

lol it would be so damn annoying especially if you get lots of things sold or lots of attacks that day every day you login you would have like 2+ events i know i doesnt sound like much but if you went on holiday you would ahve tones or events and otnes of mails to deal with.

and dj r ill cehck it out but not promising nout as im very busy.

Link to comment
Share on other sites

Re: HOUSE TAX!!!!

 

lol it would be so damn annoying especially if you get lots of things sold or lots of attacks that day every day you login you would have like 2+ events i know i doesnt sound like much but if you went on holiday you would ahve tones or events and otnes of mails to deal with.

My point exactly.

 

if not can you have a look of that please

http://criminalexistence.com/ceforums/i ... ic=12487.0

I dont do Email Validation codes.

And a thankyou would be nice for taking my time to do that code for you man

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