Jump to content
MakeWebGames

boionfire81

Members
  • Posts

    532
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by boionfire81

  1. Ok cool. Let me know when you do? My game is built heavily on crafting, farming, fishing, etc (survivalist) so this is something that can really step up the game.
  2. I currently have sniko's advanced property & nonstops advanced travel. I'm looking to modify the users will when they travel to the default "Homeless" if they do not own a house in that city. Which would mean assigning properties to a city when purchased (property will be assigned to the city the user is currently in when purchasing). And in property market showing the property location (which once original purchasers buys, the location is set and can not change through market). . Anyone interested in taking on the task? Not super rich, but coding ain't easy ;)
  3. Ok, so my players will be selecting an alliance. Angels, Demons, or Self. I need to know how to create the if statements. ie. if alliance = angels show page_part 1, elseif alliance = demons show page_part 2, else show page_part 3. Also, checking to see if exists. Similar to donator if donator = >0 but for db queries. As each side will vary upon their benefits.
  4. I've managed to be able to successfully process the itm to allow to see the purchase form, but after entering a clip number it again returns this item is not a gun rather than updating the database with clips. Here is the code so far   <?php include "globals.php"; print "<font face='Arial' size='4'>Ammunition Store</font><hr width=75%> "; $_GET['ID'] = abs((int) $_GET['ID']); $_POST['id'] = abs((int) $_POST['ID']); $_POST['clips'] = abs((int) $_POST['clips']); $cost=($_POST['clips']*500); if($_POST['clips']) { $q=$db->query("SELECT iv.*,i.* FROM inventory iv LEFT JOIN items i ON iv.inv_itemid=i.itmid WHERE i.itmid={$_POST['id']} AND i.itmtype=15 AND iv.inv_userid=$userid"); if($db->num_rows($q)==0) { print "This item is not a Gun! <a href='inventory.php' class='button'>Exit</a>"; } else if ($ir['money']<$cost) { print "You cannot afford that many clips! <a href='inventory.php' class='button'>Exit</a>"; } else { $r=$db->fetch_row($q); $x=$db->query("SELECT * FROM ammunition WHERE amWEAPON={$_GET['ID']} AND amUSER=$userid"); $y=$db->num_rows($x); $z=$db->fetch_row($x); if ($y) { $clips=($z['amAMMO']+$_POST['clips']); $db->query("UPDATE users SET money=money-$cost WHERE userid=$userid"); $db->query("UPDATE ammunition SET amAMMO=amAMMO+{$_POST['clips']} WHERE amWEAPON={$_GET['ID']} AND amUSER=$userid"); print "You bought {$_POST['clips']} rounds of ammunition for your {$r['itmname']}! You now have $clips clips for this gun. <a href='inventory.php' class='button'>Exit</a>"; } else { $db->query("UPDATE users SET money=money-$cost WHERE userid=$userid"); $db->query("INSERT INTO ammunition VALUES ('','$userid','{$_GET['ID']}',{$_POST['clips']})"); print "You bought {$_POST['clips']} rounds of ammunition for your {$r['itmname']}! <a href='inventory.php' class='button'>Exit</a>"; } } } else { $q=$db->query("SELECT iv.*,i.* FROM inventory iv LEFT JOIN items i ON iv.inv_itemid=i.itmid WHERE i.itmid={$_GET['ID']} AND i.itmtype=15 AND iv.inv_userid=$userid"); if($db->num_rows($q)==0) { print "This item is not a Gun! <a href='inventory.php' class='button'>Exit</a>"; echo "<pre>".$db->last_query."</pre>"; } else { $r=$db->fetch_row($q); print "Standard ammunition costs $500 per round for all guns. How much ammunition would you like to buy for your {$r['itmname']}. <form action='ammunition.php' method='post'> <input type='hidden' name='ID' value='{$_POST['id']}' /> Clips: <input type='text' name='clips' value='0' /> <input type='submit' value='Purchase' class='button'/></form> <a href='inventory.php' class='button'>Exit</a>"; } } $h->endpage(); ?>
  5. McCodes said he should be here on the forums. And they messaged him to email me, but nothing. And that url ^ is 404
  6. http://mccodes.com/viewmod.php?id=68
  7. Almost none of the data is saving to the database. If I add a channel. The channel name is added, but the open/closed and requirements do not work. So I'm hoping there is someone who can walk me through this step by step. Here is the database config area.   include "config.php"; global $_CONFIG; define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; require_once('global_func.php'); $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect();  
  8. Returned one result [ATTACH=CONFIG]n376180[/ATTACH]
  9. Well, what the heck? lol
  10. Not sure what to post, because I'm sure cronus doesn't want to me to post his entire module here. But line 491 is   $blah=mysql_query("SELECT * FROM workshop ORDER BY wITEM ASC",$c);
  11. came back green but MySQL returned an empty result set (i.e. zero rows). (Query took 0.0016 sec)
  12. To start with Fatal error: Uncaught Error: Call to undefined function mysql_query() in /home/public_html/workshop.php:491 Stack trace: #0 /home/public_html/workshop.php(45): staff_panel() #1 {main} thrown in /home/public_html/workshop.php on line 491
  13. This item is not a Gun! Exit SELECT iv.*,i.* FROM inventory iv LEFT JOIN items i ON iv.inv_itemid=i.itmid WHERE i.itmid=133 AND i.itmtype=15 AND iv.inv_userid=1
  14. Sorry, internet has been down most of the day.  
  15. ammunition.php   <?php include "globals.php"; print "<font face='Arial' size='4'>Ammunition Store</font><hr width=75%> "; $_GET['id'] = abs((int) $_GET['id']); $_POST['id'] = abs((int) $_POST['id']); $_POST['clips'] = abs((int) $_POST['clips']); $cost=($_POST['clips']*500); if($_POST['clips']) { $q=$db->query("SELECT iv.*,i.* FROM inventory iv LEFT JOIN items i ON iv.inv_itemid=i.itmid WHERE i.itmid={$_GET['id']} AND i.itmtype=15 AND iv.inv_userid=$userid"); if($db->num_rows($q)==0) { print "This item is not a Gun! <a href='inventory.php' class='button'>Exit</a>"; } else if ($ir['money']<$cost) { print "You cannot afford that many clips! <a href='inventory.php' class='button'>Exit</a>"; } else { $r=$db->fetch_row($q); $x=$db->query("SELECT * FROM ammunition WHERE amWEAPON={$_POST['id']} AND amUSER=$userid"); $y=$db->num_rows($x); $z=$db->fetch_row($x); if ($y) { $clips=($z['amAMMO']+$_POST['clips']); $db->query("UPDATE users SET money=money-$cost WHERE userid=$userid"); $db->query("UPDATE ammunition SET amAMMO=amAMMO+{$_POST['clips']} WHERE amWEAPON={$_POST['id']} AND amUSER=$userid"); print "You bought {$_POST['clips']} rounds of ammunition for your {$r['itmname']}! You now have $clips clips for this gun. <a href='inventory.php' class='button'>Exit</a>"; } else { $db->query("UPDATE users SET money=money-$cost WHERE userid=$userid"); $db->query("INSERT INTO ammunition VALUES ('','$userid','{$_POST['id']}',{$_POST['clips']})"); print "You bought {$_POST['clips']} rounds of ammunition for your {$r['itmname']}! <a href='inventory.php' class='button'>Exit</a>"; } } } else { $q=$db->query("SELECT iv.*,i.* FROM inventory iv LEFT JOIN items i ON iv.inv_itemid=i.itmid WHERE i.itmid={$_GET['id']} AND itmtype=15 AND iv.inv_userid=$userid"); if($db->num_rows($q)==0) { print "This item is not a Gun! <a href='inventory.php' class='button'>Exit</a>"; } else { $r=$db->fetch_row($q); print "Standard ammunition costs $500 per round for all guns. How much ammunition would you like to buy for your {$r['itmname']}. <form action='ammunition.php' method='post'> <input type='hidden' name='ID' value='{$_GET['id']}' /> Clips: <input type='text' name='clips' value='0' /> <input type='submit' value='Purchase' /></form> <a href='inventory.php' class='button'>Exit</a>"; } } $h->endpage(); ?>   Buy Ammo   if ($i['weapon'] > 0) { echo " <a href='equip_weapon.php?ID={$i['inv_id']}' class='button'>Equip</a> "; if ($i['itmtype'] == '15') { echo " <a href=ammunition.php?weid=15&ID={$i['inv_id']} class=button>Buy Ammo</a>"; } }
  16. yeah would love to see a list of his and illisions free mods
  17. Added an automatic weid=15 to the link so it looks like ammunition.php?weid=15&ID=80 And still get error "This is not a gun." Also added a GET weid to the top with the others and still no go.
  18. Ok, so try adding the itmtype to the url?
  19. no, I can't that I am. But I tend to try to trust people when they post a mod. So how should I go about this?
  20. ammunition.php?ID=80 with 80 being the item id
  21. I'mma keep working on it, unless there is a brewery that is known for working. But my cron editting is tied momentarily. To make the final test.
  22. Anyone able to help with a cron that could update the brew time?
  23. yeah I know. But I have been playing around with it a bit. The post ID v id doesn't seem to make a difference. But the GET ID v id did. That's why I tried playing around with those values. Have reverted the post id back to ID (all instances of post id) and just back to square one. No matter what This item is not a Gun
  24. How can I display certain links based off of the city that the user is in? ie. if they are in city id 1,2,5 & 7 the link shows, but for all else the link does not show?
×
×
  • Create New...