Jump to content
MakeWebGames

ThePlague

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

ThePlague's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. Re: how do u turn dps 2 items i have done the DP as items i have one error tho, i havnt created the SQL field as i dont know what to include in it...anybody know?
  2. Re: Forums im not sure as i dont have forums but i would of thought itd be just userID and userLEVEL unless your sql field has postUSER n tht
  3. Re: Side Bars how did you get tht cron manager?
  4. Re: Max Stats yeah i do! i used it one: Bank Money Cyber Bank Money Carried Money Carried Crystals But i can still only get 2.1billion on every stat, ohwell no one will ever get there!
  5. Re: Max Stats no we did what you said and we can have 2.147billion on every stat now as we used to have 100million but will what you said above get rid of money stat limit?
  6. Re: Sell all button take it noone likes? well i got a new stat layout ill post on here when i can be bothered
  7. Re: Sell all button   Nah not stolen codes but i dont want to release the game until i have a new server and the crons are working, as soon as thats working [hopefully 8PM tonight, 5/02/07] i will post the name in my signiture!
  8. Re: Sell all button i took the code and pimped it out: <?php /* ----------------------------------------- Just a little thing i came up with ----------------------------------------- */ session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm); $h->menuarea(); $_GET['ID'] = abs((int) $_GET['ID']); $_GET['qty'] = make_bigint($_GET['qty']); //itemsell if($_GET['qty']) { $id=mysql_query("SELECT iv.*,it.* FROM inventory iv LEFT JOIN items it ON iv.inv_itemid=it.itmid WHERE iv.inv_id={$_GET['ID']} AND iv.inv_userid=$userid LIMIT 1",$c); if(mysql_num_rows($id)==0) { print "Invalid item ID"; } else { $r=mysql_fetch_array($id); if($_GET['qty'] > $r['inv_qty']) { print "You are trying to sell more than you have!"; } else { $price=$r['itmsellprice']*$_GET['qty']; //are we sending it all if($_GET['qty'] == $r['inv_qty']) { //just give them possession of the item mysql_query("DELETE FROM inventory WHERE inv_id={$_GET['ID']}",$c); } else { //create seperate mysql_query("UPDATE inventory SET inv_qty=inv_qty-{$_GET['qty']} WHERE inv_id={$_GET['ID']} LIMIT 1;",$c); } mysql_query("UPDATE users SET money=money+{$price} WHERE userid=$userid",$c); $priceh="$".($price); print "You sold {$_GET['qty']} {$r['itmname']}(s) for {$priceh}"; mysql_query("INSERT INTO itemselllogs VALUES ('', $userid, {$r['itmid']}, $price, {$_GET['qty']}, unix_timestamp(), '{$ir['username']} sold {$_GET['qty']} {$r['itmname']}(s) for {$priceh}')", $c); } } } else if($_GET['ID']) { $id=mysql_query("SELECT iv.*,it.* FROM inventory iv LEFT JOIN items it ON iv.inv_itemid=it.itmid WHERE iv.inv_id={$_GET['ID']} and iv.inv_userid=$userid LIMIT 1",$c); if(mysql_num_rows($id)==0) { print "Invalid item ID"; } else { $r=mysql_fetch_array($id); print " [b]Enter how many {$r['itmname']} you want to sell. You have {$r['inv_qty']} to sell.[/b] <form action='itemsell.php' method='get'> <input type='hidden' name='ID' value='{$_GET['ID']}' /> <table width=30% border=1><tr><td width=20% valign='top'>[b]<center>Quantity</center>[/b]</font></td><td>[b]Links[/b]</td> <tr><td><input type='text' name='qty' value='' /></td><td><input type='submit' value='Sell Items' /></form></td><tr><td>Sell All You Have Of This Item</td><td><input type='submit' value='Sell All' /></form></td> <form action='itemsell.php' method='get'> <input type='hidden' name='ID' value='{$_GET['ID']}' /> <input type='hidden' name='qty' value='{$r['inv_qty']}' />"; } } else { print "Invalid use of file."; } $h->endpage(); ?> Its not brilliant but its a bit tidier, until someone makes it look better use this as the itemsell.php :? oh well im not that good a coder anyways. If you want a screen shot check this http://img406.imageshack.us/img406/3342/isscreenshotap5.png
  9. Re: HOW DO U PUT A BACKGROUND ON YOUR GAME LOL yh it is, should say body-bg-color: #FFFFFF or summit like tht if you want an image you just modify a little bit
  10. Re: Free Jail Features V1.00000000 Relesed! has anybody got the jail bust.php and bail.php codes without the #'s n stuff like tht?
  11. Re: Useful little function: Get_url i need to un cache my pages my game says summit like this [i have not stolen the name of this site its just an example] E.G:http://www.criminalexistance.com for every page, so instead of http://www.criminalexistance.com/login.php it will be http://www.criminalexistance.com. Anybody got any ideas? i tried using the code above but it didnt fix my problem and i dnt think it was sposed to but it was wirth a try
×
×
  • Create New...