Jump to content
MakeWebGames

CJ - Twitch

Members
  • Posts

    391
  • Joined

  • Last visited

Everything posted by CJ - Twitch

  1. <?php include "globals.php"; $_GET['to'] = abs((int) $_GET['to']); if(!$_GET['to']) { print "Welcome to the Monorail Station. Where would you like to travel today? "; $q=$db->query("SELECT * FROM cities WHERE cityid != {$ir['location']} AND cityminlevel <= {$ir['level']}"); print "<table width=75% cellspacing=1 class='table'><tr style='background:gray'><th>Name</th><th>Description</th><th>Min Level</th><th>Cost</th><th></th></tr>"; while($r=$db->fetch_row($q)) { print "<tr><td>{$r['cityname']}</td><td>{$r['citydesc']}</td><td>{$r['cityminlevel']}</td><td>\${$r['citycost']}</td><td><a href='monorail.php?to={$r ['cityid']}'>Go</a></td></tr>"; } print "</table>"; } else { if($ir['money'] < $r['citycost']) { print "You don't have enough money. You need {$r['citycost']} to travel to {$r['cityname']}"; } else if( ((int) $_GET['to']) != $_GET['to']) { print "Invalid city ID"; } else { $q=$db->query("SELECT * FROM cities WHERE cityid = {$_GET['to']} AND cityminlevel <= {$ir['level']}"); if(!$db->num_rows($q)) { print "Error, this city either does not exist or you cannot go there."; } else { $db->query("UPDATE users SET money=money-{$r['citycost']},location={$_GET['to']} WHERE userid=$userid"); $r=$db->fetch_row($q); print "Congratulations, you paid \${$r['citycost']} and travelled to {$r['cityname']} on the monorail!"; } } } $h->endpage(); ?>   [mysql]ALTER TABLE `cities` ADD `citycost` INT( 11 ) NOT NULL AFTER `cityid` ;[/mysql] This is my script but I get this... 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 'location=2 WHERE userid=1' at line 1 Query was UPDATE users SET money=money-,location=2 WHERE userid=1 Any ideas?
  2. Lmao I just did mine. xD I will be using yours. Alot neater. :thumbsup:
  3. Great work. :thumbsup:
  4. Good idea. I will make one soon. )
  5. Good work. :)
  6. looking good. :)
  7. Did you include it in header.php? Under include "globals.php"; add include "notify.php";
  8. Great work. :)
  9. Very nice. :) good work. :thumbsup:
  10. Yeah and thats coming from a Professional. :P Please help.
  11. How about a mission or crime module. :)
  12. Thank you! Great work. :thumbsup:
  13. Yeah but still great work. :thumbsup:
  14. Great work but personally I don't see the point in this. I won't be installing it because it wont help keep inflation down. :P I mean if you think that your gang is going to be destroyed take your money out. :P
  15. I can't get it to work. xD
  16. TBH those 127 files could be turned into 80ish.
  17. You don't need to secure explore.php. :P
  18. It is a very good mod. :) I'm using this.
  19. First things first is secure your header.php. Then if your using MCC V2 secure the forums. :) You may also wan't to secure crystal market, item market and I would personally secure mailbox. I have forgotten how many mails I have had that have made me change some user in to a admin.
  20. So how long till this is released?
  21. It works but how. xD
  22. Here ya go... [mp]17[/mp]
  23. Don't we need the file. iteminfo.min.php
  24. WRX don't we need something to download xxD
×
×
  • Create New...