
The Ace
Members-
Posts
363 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by The Ace
-
Re: IE and FF Thanks -z-e-r-o-, works wonders in both IE and FF! Cheers. :D
-
Re: [FREE]Music system Thanks! :) It works great! However, I am not too keen on R&B and HipHop...does anyone know of a radio like this one, but it plays rock music instead?
-
Re: Database...Annoying! Anyone able to help me....?
-
Right, I am trying to make the links in my game change colour when you hover over it....I managed to get it to work, but it only works in IE. The link is lime and the hover colour is, for example, magenta. But in Mozilla FireFox it stays/goes as a weird purple. I have the a:visited as lime, and the a:link as lime, and the a:active and a:hover are magenta. FF has visited links as purple, non-visited links as lime, and they don't change colour when I hover over them. Anyone know how I can get this to work for both IE and FF? I run V2, if that is any help. Sorry if I sound unclear...lol.
-
Re: [FREE]Music system That's V1, isn't it? How do I change it to V2? And do I need the: include "global.php" etc....?
-
Re: Gym Record I like this and I use it in my game! :) Great mod! But, how do I get it to display the username of the person who trained, in staff gym logs? (I want to keep the userid as well). (I know this is probably easy, but I banged my head quite badly and I'm not totally with it, if ya know what I mean...) :-P Cheers.
-
Re: Database...Annoying! OK, here is my original estate.php: <?php include "globals.php"; if($ir['jail'] or $ir['hospital']) { die("This page cannot be accessed while in jail or hospital."); } $mpq = $db->query("SELECT * FROM houses WHERE hWILL={$ir['maxwill']}"); $mp = $db->fetch_row($mpq); $_GET['property']=abs((float) $_GET['property']); if($_GET['property']) { $npq = $db->query("SELECT * FROM houses WHERE hID={$_GET['property']}"); $np = $db->fetch_row($npq); if($np['hWILL'] < $mp['hWILL']) { echo "You cannot go backwards in houses!"; } else if ($np['hPRICE'] > $ir['money']) { echo "You do not have enough money to buy the " . $np['hNAME']; } else { $db->query("UPDATE users SET money=money-{$np['hPRICE']},will=0,maxwill={$np['hWILL']} WHERE userid=$userid"); echo "Congrats, you bought the {$np['hNAME']} for £{$np['hPRICE']}!"; } } else if (isset($_GET['sellhouse'])) { $npq = $db->query("SELECT * FROM houses WHERE hWILL={$ir['maxwill']}"); $np = $db->fetch_row($npq); if($ir['maxwill'] == 100) { echo "You already live in the lowest property!"; } else { $db->query("UPDATE users SET money=money+{$np['hPRICE']},will=0,maxwill=100 WHERE userid=$userid"); echo "You sold your {$np['hNAME']} and went back to your wooden hut."; } } else { echo "Your current property: [b]{$mp['hNAME']}[/b] The houses you can buy are listed below. Click a house to buy it. "; if($ir['maxwill'] > 100) { echo "[url='estate.php?sellhouse']Sell Your House[/url] "; } $hq=$db->query("SELECT * FROM houses WHERE hWILL>{$ir['maxwill']} ORDER BY hWILL ASC"); while($r=$db->fetch_row($hq)) { echo "[url='estate.php?property={$r[']{$r['hNAME']}[/url]   - Cost: £" . number_format($r['hPRICE'], "") . "   - Will Bar: " . number_format($r['hWILL'], "") . " "; } } $h->endpage(); ?> Thanks... :)
-
Re: Database...Annoying! I did this, and I can sell the bigger houses, but I don't seem to get the money from selling it....grr. Should I just post my estate page, with or without the update I did from killah?
-
Re: Database...Annoying! OK, here are a few lines above and below that damn erroring (lol) query: $db->query("UPDATE users SET money=money-{$np['hPRICE']},will=0,maxwill={$np['hWILL']} WHERE userid=$userid"); echo "Congrats, you bought the {$np['hNAME']} for £{$np['hPRICE']}!"; } } else if (isset($_GET['sellhouse'])) { $npq = $db->query("SELECT * FROM houses WHERE hWILL={$ir['maxwill']}"); $np = $db->fetch_row($npq); if($ir['maxwill'] == 100) { echo "You already live in the lowest property!"; } else { $db->query("UPDATE users SET money=money+{$np['hPRICE']},will=0,maxwill=100 WHERE userid=$userid"); echo "You sold your {$np['hNAME']} and went back to your wooden hut."; } } else { echo "Your current property: [b]{$mp['hNAME']}[/b] The houses you can buy are listed below. Click a house to buy it. "; if($ir['maxwill'] > 100) { echo "[url='estate.php?sellhouse']Sell Your House[/url] "; }
-
Re: Humph...help please! I have found it out myself! lol. :)
-
Right, I have been kinda testing the selling feature of houses, and I can't seem to sell houses that have prices such as 1e+15...the house price is an ordinary number in the estate.php, but in the database it is 1e+15. This is the error I get: QUERY ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'will=0,maxwill=100 WHERE userid=1' at line 1 Query was UPDATE users SET money=money+,will=0,maxwill=100 WHERE userid=1 Here is the query in the code: $db->query("UPDATE users SET money=money+{$np['hPRICE']},will=0,maxwill=100 WHERE userid=$userid"); It seems to be missing, in the error: {$np['hPRICE']} GRR! It is because the price of the house is 1e+15 and not the full, proper number, in the database... What I would like to know is, how do I get rid of the 1e+15 and all, and make it a proper layed out number? :cry:
-
I am trying to add a table into my database for donator houses...and I have successfully added the house ID, which I called the field dhID. But I am having trouble setting it to auto_increment. I get this error whenever I edit the structure of it: SQL query: ALTER TABLE `dhouses` CHANGE `dhID` `dhID` INT( 11 ) NOT NULL AUTO_INCREMENT MySQL said: Documentation #1075 - Incorrect table definition; there can be only one auto column and it must be defined as a key Any help/ideas?
-
[mccode] How to Setup PayPal Instant Payment Notification - Free!
The Ace replied to oxidati0n's topic in Free Modifications
Re: [mccode] How to Setup PayPal Instant Payment Notification - Free! I know this topic hasn't been posted in for a while, and I know what I'm about to post it kind of the opposite of what this topic is, but I think this is a relevant place to post it: How do I turn off the auto-crediting? And also, how do I actually know it's on, without donating myself? Cheers, The Ace -
I'm not too sure what forum to put this in, so I have decided to put it here! :-P Right, how do I turn off auto-crediting when someone donates? I have V2... And, so I know when people donate, I would like something in my staff panel (only for admins), where I can see which people have donated....(and I know that is a mod request....) Cheers, The Ace
-
Re: Decimals in Banks Thanks mate! Worked like a peach! (I knew that! not, lol). :) :-D
-
Re: Decimals in Banks I'm stumped as well, because I can't find $money! Here is my bank code: <?php include "globals.php"; if($ir['jail'] or $ir['hospital']) { die("This page cannot be accessed while in jail or hospital."); } print "<h3>Bank</h3>"; if($ir['bankmoney']>-1) { switch($_GET['action']) { case "deposit": deposit(); break; case "withdraw": withdraw(); break; default: index(); break; } } else { if(isset($_GET['buy'])) { if($ir['money']>49999) { print "Congratulations, you bought a bank account for £50,000! [url='bank.php']Start using my account[/url]"; $db->query("UPDATE users SET money=money-50000,bankmoney=0 WHERE userid=$userid"); } else { print "You do not have enough money to open an account. [url='explore.php']Back to town...[/url]"; } } else { print "Open a bank account today, just £50,000! [url='bank.php?buy']> Yes, sign me up![/url]"; } } function index() { global $db, $ir,$c,$userid,$h; print "\n[b]You currently have £{$ir['bankmoney']} in the bank.[/b] At the end of each day, your bank balance will go up by 2%. <table width='75%' cellspacing=1 class='table'> <tr> <td width='50%'>[b]Deposit Money[/b] It will cost you 15% of the money you deposit, rounded up. The maximum fee is £3,000.<form action='bank.php?action=deposit' method='post'> Amount: <input type='text' name='deposit' value='{$ir['money']}' /> <input type='submit' value='Deposit' /></form></td> <td> [b]Withdraw Money[/b] There is no fee on withdrawals.<form action='bank.php?action=withdraw' method='post'> Amount: <input type='text' name='withdraw' value='{$ir['bankmoney']}' /> <input type='submit' value='Withdraw' /></form></td> </tr> </table>"; } function deposit() { global $db,$ir,$c,$userid,$h; $_POST['deposit']=abs((float) $_POST['deposit']); if($_POST['deposit'] > $ir['money']) { print "You do not have enough money to deposit this amount."; } else { $fee=ceil($_POST['deposit']*15/100); if($fee > 3000) { $fee=3000; } $gain=$_POST['deposit']-$fee; $ir['bankmoney']+=$gain; $db->query("UPDATE users SET bankmoney=bankmoney+$gain, money=money-{$_POST['deposit']} where userid=$userid"); print "You hand over £{$_POST['deposit']} to be deposited, after the fee is taken (£$fee), £$gain is added to your account. [b]You now have £{$ir['bankmoney']} in the bank.[/b] [url='bank.php']> Back[/url]"; } } function withdraw() { global $db,$ir,$c,$userid,$h; $_POST['withdraw']=abs((float) $_POST['withdraw']); if($_POST['withdraw'] > $ir['bankmoney']) { print "You do not have enough banked money to withdraw this amount."; } else { $gain=$_POST['withdraw']; $ir['bankmoney']-=$gain; $db->query("UPDATE users SET bankmoney=bankmoney-$gain, money=money+$gain where userid=$userid"); print "You ask to withdraw $gain, the banking lady grudgingly hands it over. [b]You now have £{$ir['bankmoney']} in the bank.[/b] [url='bank.php']> Back[/url]"; } } $h->endpage(); ?> Whereabouts do you think I should put it? lol :)
-
Re: Decimals in Banks Whereabouts do I put/edit this?
-
Re: Large Number.... Thanks, but there is a slight problem with: <td><a href='estate.php?property={$r['hID']}'>Buy</tr>"; } print "</table>"; I did get rid of the "; after </tr>, but then there was a parse error on the other line...something wrong with the / in </table>....grr!
-
Re: 3 Word Game shop and had
-
Re: Large Number.... I don't think that was for the updated version...because I can't find: <td>[url='estate.php?property={$r[']{$r['hNAME']}[/url]   - Cost: £" . number_format($r['hPRICE'], "") . "   - Will Bar: " . number_format($r['hWILL'], "") . " </tr>"; in my updated one.... If you don't mind, could you please try and do it with: <?php include "globals.php"; $mpq=$db->query("SELECT * FROM houses WHERE hWILL={$ir['maxwill']}"); $mp=$db->fetch_row($mpq); $_GET['property']=abs((float) $_GET['property']); if($_GET['property']) { $npq=$db->query("SELECT * FROM houses WHERE hID={$_GET['property']}"); $np=$db->fetch_row($npq); if($np['hWILL'] < $mp['hWILL']) { print "You cannot go backwards in houses!"; } else if ($np['hPRICE'] > $ir['money']) { print "You do not have enough money to buy the {$np['hNAME']}."; } else { $db->query("UPDATE users SET money=money-{$np['hPRICE']},will=0,maxwill={$np['hWILL']} WHERE userid=$userid"); print "Congrats, you bought the {$np['hNAME']} for £{$np['hPRICE']}!"; } } else if (isset($_GET['sellhouse'])) { $npq=$db->query("SELECT * FROM houses WHERE hWILL={$ir['maxwill']}"); $np=$db->fetch_row($mpq); if($ir['maxwill'] == 100) { print "You already live in the lowest property!"; } else { $db->query("UPDATE users SET money=money+{$np['hPRICE']},will=0,maxwill=100 WHERE userid=$userid"); print "You sold your {$np['hNAME']} and went back to your wooden hut."; } } else { print "<center>Your current property: <font color=blue>[b]{$mp['hNAME']}[/b]</font> The houses you can buy are listed below. Click a house to buy it. "; print "[url='estate.php?sellhouse']Sell Your House[/url] "; if($ir['willmax'] > 100) { } $hq=$db->query("SELECT * FROM houses WHERE hWILL>{$ir['maxwill']} ORDER BY hWILL ASC"); while($r=$db->fetch_row($hq)) { print " <table cellspacing=2 class='table'><tr style='background:gray;'><th>House</th><th>House Price</th><th>House Will</th><th>Buy?</th></tr>"; $hq=mysql_query("SELECT * FROM houses WHERE hWILL>{$ir['maxwill']} ORDER BY hWILL ASC",$c); while($r=$db->fetch_row($hq)) { print "<tr><td>{$r['hNAME']}</a></td><td>£$t".money_formatter($r['hPRICE'],'')."</td> <td>{$r['hWILL']}</td> <td><a href='estate.php?property={$r['hID']}'>Buy</tr>"; } print "</table>"; } } $h->endpage(); ?> because my will is still going into the +e... Thanks. :)
-
Re: Large Number.... That's actually not the last house... :-P lol Anyone know how to fix this?
-
Re: Hmmm, Parse Error annoying! NEVERMIND! I have found my error! I needed a } before print "</td....
-
I have a Parse Error on line 60: Parse error: syntax error, unexpected $end in /usr/home/u1149/domains/globalconflict2250.co.uk/public_html/explore.php on line 60 yet this is line 60: ?> I have recently added a new feature, but trying to make it donator only: (here is the code above ?>: if($ir['donatordays']) { print "[url='donatorrubytrader.php']Donator Ruby Trader[/url] "; print "</td></tr></table> This is your referal link: http://{$domain}/register.php?REF=$userid Every signup from this link earns you <big>[b]50[/b]</big> valuable crystals!"; $h->endpage(); I recently added: if($ir['donatordays']) { print "[url='donatorrubytrader.php']Donator Ruby Trader[/url] "; Any help? :)
-
Re: SQL Queries ALTER TABLE `users` DROP `bankcrystal2` worked! :) Thanks a lot Spudinski! :D Highly appreciated...
-
Re: SQL Queries Humph...bugger: SQL query: ALTER TABLE `users` DROP INDEX `bankcrystal2` MySQL said: Documentation #1091 - Can't DROP 'bankcrystal2'; check that column/key exists