Jump to content
MakeWebGames

Mark F

Members
  • Posts

    196
  • Joined

  • Last visited

    Never

Everything posted by Mark F

  1. Re: Point/Cash Exchange   I posted the part that I attempted in my first post, the second section of code.
  2. Re: Point/Cash Exchange   In crystaltemple.php you are able to sell points for cash, though I wish for the user also to be able to buy points using cash.
  3. Re: Basic Stock Market [V2] Is there a way that you could make it so that the game owner was able to see what stocks people own, and possibly what they were worth when the player bought them?
  4. Re: Basic Stock Market [V2]   Thanks Tonka!
  5. Re: Basic Stock Market [V2] I know that this might sound a little noobish, though does anyone know how to order the stock by name alphabetically? A-Z
  6. Hello everyone, I have been trying to make a script where you are able to buy points for $1000, and sell them for $1000. Though I have been having a little trouble with the coding. I have so far tried to modify crystaltemple.php which allows you to trade points for cash, though I have had trouble trying to make it work vice versa. I would appreciate it if I could have some help modifying the script below.   <?php include "globals.php"; if(!$_GET['spend']) { print " <table cellspacing='1' border='0' cellpadding='3' class='table' width='30%'><tr> <td colspan='1' class='h'>[b]You Have {$ir['crystals']} Points[/b]</td> <td colspan='1' class='h'>[b]Purchase[/b]</td> </tr> <tr> <td>\$".number_format($set['ct_moneypercrys'])." Money - 01 Points</td> <td>[url='crystaltemple.php?spend=money']Purchase[/url]</td> </tr> <tr> <td>Energy Refil - {$set['ct_refillprice']} Points</td> <td>[url='crystaltemple.php?spend=refill']Purchase[/url]</td> </tr> </table>"; } else { if($_GET['spend'] == 'refill') { if($ir['crystals'] <$set['ct_refillprice']) { print "You don't have enough Credits!"; } else if($ir['energy'] == $ir['maxenergy']) { print "You already have full energy."; } else { $db->query("UPDATE users SET energy=maxenergy,crystals=crystals-{$set['ct_refillprice']} WHERE userid=$userid"); print "You have paid {$set['ct_refillprice']} Credits to refill your energy bar."; } } else if($_GET['spend'] == 'IQ') { print "Type in the amount of Credits you want to swap for IQ. You have [b]{$ir['crystals']}[/b] Credits. One Credit = {$set['ct_iqpercrys']} IQ.<form action='crystaltemple.php?spend=IQ2' method='post'><input type='text' name='crystals' /> <input type='submit' value='Swap' /></form>"; } else if($_GET['spend'] == 'IQ2') { $_POST['crystals']=(int) $_POST['crystals']; if($_POST['crystals'] <= 0 || $_POST['crystals'] > $ir['crystals']) { print "Error, you either do not have enough Credits or did not fill out the form. [url='crystaltemple.php?spend=IQ']Back[/url]"; } else { $iqgain=$_POST['crystals']*$set['ct_iqpercrys']; $db->query("UPDATE users SET crystals=crystals-{$_POST['crystals']} WHERE userid=$userid"); $db->query("UPDATE userstats SET IQ=IQ+$iqgain WHERE userid=$userid"); print "You traded {$_POST['crystals']} Credits for $iqgain IQ."; } } else if($_GET['spend'] == 'money') { print "Type in the amount of Credits you want to swap for money. You have [b]{$ir['crystals']}[/b] Credits. One Credit = \$".number_format($set['ct_moneypercrys']).".<form action='crystaltemple.php?spend=money2' method='post'><input type='text' name='crystals' /> <input type='submit' value='Swap' /></form>"; } else if($_GET['spend'] == 'money2') { $_POST['crystals']=(int) $_POST['crystals']; if($_POST['crystals'] <= 0 || $_POST['crystals'] > $ir['crystals']) { print "Error, you either do not have enough Credits or did not fill out the form. [url='crystaltemple.php?spend=money']Back[/url]"; } else { $iqgain=$_POST['crystals']*$set['ct_moneypercrys']; $db->query("UPDATE users SET crystals=crystals-{$_POST['crystals']},money=money+$iqgain WHERE userid=$userid"); print "You traded {$_POST['crystals']} Credits for \$".number_format($iqgain)."."; } } } $h->endpage(); ?>   Below is what I have attempted to do, though has not worked for me. [Not in the script above] } else if($_GET['spend'] == 'points') { print "<HR width='75%'>Type in the amount of cash you would like to trade for points, 1 point = $1000.<HR width='75%'> <form action='tradingbooth.php?spend=points2' method='post'><input type='text' name='money' /> <input type='submit' value='Trade' /></form>"; } else if($_GET['spend'] == 'points2') { $_POST['money']=(int) $_POST['money']; if($_POST['money'] <= 1000 || $_POST['money'] > $ir['money']) { print "Error, you either do not have enough money or did not fill out the form. [url='tradingbooth.php?spend=points']Back[/url]"; } else { $iqgain=$_POST['money']/1000; $db->query("UPDATE users SET crystals=crystals+$iqgain,money=money-{$_POST['money']} WHERE userid=$userid"); print "You traded {$_POST['crystals']} Credits for \$".number_format($iqgain)."."; }
  7. Re: [v2] Newspaper MOD Your website is already too confusing for me, lol. "You dont have a newspaper how are you going to read one?"
  8. Re: Most of my Mods for V2 Thanks for posting the mods, I will look into them if I find the time!
  9. Re: [v2]Casino[v2] I have had way too many problems to list with this mod, I would not recommend installing this mod on a commercial website, install it on your BETA website first and fix all of the problems (if you can be bothered).
  10. Re: [v2]Casino[v2]   I tried this code, though I had to use the casino.php originally posted in this thread. It kept asking me to buy a new casino account, after I had already purchased one. POST EDITED: This edit may actually work properly, I may have been having the problem because I had -900 credits.
  11. Re: [v2]Casino[v2] First Error: I went to the casino and started playing lucky boxes, then my credits suddenly went down to -900.
  12. Re: [v2]Casino[v2] I am adding this right now, and I will get back to you after I have tested it!
  13. Could someone please help me set up the Apex Web Gaming Incentives script? The example on the website is as follows, though I am not completely sure what to do.   <?php //////// Example Post-Back Script for Apex Web Gaming // include database connection here // this is the variable we pass back to you that // contains the value you passed to us with the vote link $user = $_POST['i']; // check if the user has voted $check_voted = mysql_fetch_array(mysql_query("SELECT vote FROM users WHERE username = '$user'")); if ($check_voted[0] == 0) { // if they haven't voted // credit the user for voting, like giving +100 money as in the example mysql_query("UPDATE users SET money = money + 100, vote = '1' WHERE username = '$user'"); } ?>   Does anyone actually use this incentives method, or are people using alternatives? If I cannot get this to work, I have nearly finished an embedded script.
  14. Re: Userlist Ascend or Descend in any order of preference Not Too Shabby!
  15. Re: Usersonline [V2]   Make a better mod, why don't you.
  16. Re: Multiple Houses [V2] It is a good script Richard, though I think that I will remove it from my game.
  17. Re: Strip Club I will test it out soon, though what is the rating for your game, lol?
  18. Re: Display Gangs Name??? I couldn't get it to work, I think that it had something to do with {$_GET['ID']} in the queries.
  19. Re: [V2] Credit Card Mod [V2]   Great Feature!
  20. Re: [V2] Simple Bombing Mod [V2] - ($2) No offense or anything, though could you have come up with a worse modification!
  21. Re: Explore your streets.php as an image Could you post a few screenshots up?
  22. Re: Blow members minds with the ULTIMATE explore page Great concept, though it is really just an image map.
  23. Re: [Free][v1][v2] Password reset code Thanks for the script, it works well!
  24. Re: Register [Free] When I create an account it works, though it displays the following: QUERY ERROR: Column count doesn't match value count at row 1 Query was INSERT INTO pdetails VALUES(85, 'N/A', 'N/A', 0, 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'OFF')
  25. Re: Register [Free] You are a bloody legend, thanks so much. I just removed the code below when I was editing the script, and replaced it afterwards, because of the whole multiple account protection system.   $IP = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; $iap = $_SERVER['REMOTE_ADDR']; $gq=mysql_query("SELECT * FROM `users` WHERE `lastip`='$iap'",$c); if (mysql_num_rows($gq) > 0) { die("<font color=red size=-1>{$set['game_name']} has taken action against multiple accounts, If you have another party in your household wanting to play please contact {$set['game_owner']}"); } $gq=mysql_query("SELECT * FROM `users` WHERE `lastip_login`='$iap'",$c); if (mysql_num_rows($gq) > 0) { die("<font color=red size=-1>{$set['game_name']} has taken action against multiple accounts, If you have another party in your household wanting to play please contact {$set['game_owner']}"); } $gq=mysql_query("SELECT * FROM `users` WHERE `lastip_signup`='$iap'",$c); if (mysql_num_rows($gq) > 0) { die("<font color=red size=-1>{$set['game_name']} has taken action against multiple accounts, If you have another party in your household wanting to play please contact {$set['game_owner']}"); } if(file_exists('ipbans/'.$ip)) { die("[b]<font color=red size=+1>Your IP has been banned, there is no way around this.</font>[/b]</body></html>"); } if(file_exists('ipbans/'.$IP)) { die("[b]<font color=red size=+1>Your IP has been banned, there is no way around this.</font>[/b]</body></html>"); }
×
×
  • Create New...