Jump to content
MakeWebGames

Kieran-R

Members
  • Posts

    551
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Kieran-R

  1. Hey. Well I was making a mob for my game and ive done next to all of it. I was just encountering a problem which I will explain bellow. Well i have made the most part of a car mod for my game. When a user has a car, it reduces there traveling cost. The reduction depends on the car.   <?php require_once(dirname(__file__) .'/globals.php'); $_GET['to'] = (isset($_GET['to']) && !empty($_GET['to'])) ? intval($_GET['to']) : false; if ($ir['car']==0){ echo "You do not own a car! However, you may buy one from the [url='cardealership']car dealership[/url]."; $h->endpage(); exit(); } $q=$db->query("SELECT * FROM cities WHERE cityid != {$ir['location']} AND cityminlevel <= {$ir['level']}"); $r=$db->fetch_row($q); $mycar = $db->query("SELECT * FROM cars WHERE carID={$ir['car']}"); $ic=$db->fetch_row($mycar); if(!$_GET['to']) { print" <h3>Car Travel</h3> Where would you like to travel today in your {$ic['carNAME']}? <font size = 1><font color = black>[b] Please Note: Because you own a {$ic['carNAME']}, you can travel {$ic['carSAVING']}% cheaper price!</font></font>[/b]"; $q=$db->query("SELECT * FROM cities WHERE cityid != {$ir['location']} AND cityminlevel <= {$ir['level']}"); print "<table width=75% cellspacing=1 class='table' border='1'><tr style='background:gray'><th>Name</th><th>Min Level</th><th>Price</th><th></th></tr>"; while($r=$db->fetch_row($q)) { $cost1 = $r['citycost'] * $ic['carSAVING1']; $cost2 = $r['citycost']-$cost1; print "<tr><td>{$r['cityname']}</td><td>{$r['cityminlevel']}</td><td>$cost2</td><td>[url='cartravel.php?to={$r[']Go[/url]</td></tr>"; } print "</table>";   As you may see, I am specifying $cost1, and $cost2 which is defining the cost of which it will charge the user. And yes, the coulomb carSAVING1 is defined as a decimal in the DB. But the problem is, when $cost2 (the final cost value) is echoed out, It is returning 0 when it most defintally shouldnt be. I relise I may not have explained my problem to well, but if someone could help me out in this situation then it would be great! (Please not, the code posted here is not the full code. Only a section)
  2. haha! Thanks for pointing that out Djkanna! Original post has been edited...
  3. Basic little mod where users can buy crystals with there money from the game. crystalsdealer.php: <?php include "globals.php"; $_GET['buy'] = (isset($_GET['buy']) && !empty($_GET['buy'])) ? intval($_GET['buy']) : false; if ($_GET['buy']==100){ if ($ir['money'] < 700000){ echo "Sorry! You must have $700,000 on hand to buy 100 crystals!"; $h->endpage(); exit(); } $db->query("UPDATE users SET crystals=crystals+100, money=money-700000 WHERE userid=$userid"); echo "You have bought 100 crystals for $700,000!"; $h->endpage(); exit(); } if ($_GET['buy']==1000){ if ($ir['money'] < 6000000){ echo "Sorry! You must have $6,000,000 on hand to buy 1,000 crystals!"; $h->endpage(); exit(); } $db->query("UPDATE users SET crystals=crystals+1000, money=money-6000000 WHERE userid=$userid"); echo "You have bought 1,000 crystals for $6,000,000!"; $h->endpage(); exit(); } if ($_GET['buy']==10000){ if ($ir['money'] < 50000000){ echo "Sorry! You must have $50,000,000 on hand to buy 10,000 crystals!"; $h->endpage(); exit(); } $db->query("UPDATE users SET crystals=crystals+10000, money=money-50000000 WHERE userid=$userid"); echo "You have bought 10,000 crystals for $50,000,000!"; $h->endpage(); exit(); } echo" <h3>Crystals Dealer</h3> Here you can buy points from the crystals dealer for cash. The more points you buy, the cheaper they are.</p> <table> <tr> <th>Amount</th> <th>Price</th> </tr> <tr> <td>[url='crystalsdealer.php?buy=100']100 Points[/url]</td> <td>$700,000</td> </tr> <tr> <td>[url='crystalsdealer.php?buy=1000']1,000 Points[/url]</td> <td>$6,000,000</td> </tr> <tr> <td>[url='crystalsdealer.php?buy=10000']10,000 Points[/url]</td> <td>$50,000,000</td> </tr> </table>"; $h->endpage(); ?>
  4. Post the crons you have running on your cPanel. If you are not using curl, then thats why.
  5. put this below <?php : error_reporting(0);
  6. How are we supposed to fix it if we cant see the code?
  7. search for: Donate to {$set['game_name']} now for game benefits!
  8. goto criminal.php instead... criminal1.php name was messsing up. But still not working with IE anyways... The fact that its working greatly on all browsers except IE should rule out files that are named wrong ect...
  9. Sorry. I sayed wrong pass. Updated the post.
  10. sure. URL: mafianation.net USERNAME: test PASS: test911 CRIMESPAGE: .../criminal1.php Workes on every browser but IE for me.
  11. Just tested it on IE, and its definitely not working on IE. But after a abusive message from danny, I say you can do what you want with your mods. Im just warning people who may want to buy, that it wasnt working on IE for me.
  12. Just to let people aware, that this is not compatible with IE, or mobile browsers... SO think carefully before buying...
  13. Hmm I see. I have looked through the code, and this probably shouldn't be happening? Mabe one of the more experienced coders can review it? :)
  14. I dont understand where your bug is coming from. As you can see in my code, when the user has max drug dealers and they try to collect, there is no query that gives them the collected money.
  15. Thanks for the tip. I am going to probally sell this as one pack, but all these threads are going to just end up being like a spam right? :( Also, Im open to any suggestions! If the suggestion isnt that big an addition, then I will happily add it to the mod for free :)
  16. Thank You :)
  17. Hello. I just finished making a new mod that will hopefully encourage your users to donate more, and will bring a bit more cash into your game economy. Its a "Drug Dealers" mod where users train, then collect from there drug dealers. Non donators get 3 daily collections, while donators get 5. (easily changed) It costs users energy to train drug dealers, while it will cost them max brave to collect from them. So here it is: SQLS: [mysql]ALTER TABLE `users` ADD `drugdealers` INT( 11 ) NOT NULL DEFAULT '0', ADD `maxdealers` INT( 11 ) NOT NULL DEFAULT '100', ADD `ddcollections` INT( 11 ) NOT NULL DEFAULT '0'[/mysql],   [mysql]ALTER TABLE `houses` ADD `maxdealers` INT( 11 ) NOT NULL DEFAULT '0'[/mysql] drugdealers.php <?php require_once(dirname(__file__) .'/globals.php'); $_POST['train'] = (isset($_POST['train']) && !empty($_POST['train'])) ? intval($_POST['train']) : false; $rand = rand(2,4); $ddgain = $rand * $_POST['train']; $totalddgain = $ddgain+$ir['drugdealers']; $energyupdate = $ir['energy']-$_POST['train']; $collectgain = $ir['drugdealers']*$rand; $totcollect = $collectgain+$ir['money']; if($_POST['train']) { if($_POST['train'] > $ir['energy']) { echo"<font color = red>[b]Sorry. You dont have enough energy to train that amount of dealers.[/b]</font> "; } else { if($ir['drugdealers']==$ir['maxdealers']){ echo"<font color = red>[b]Sorry. You reached the most amount of dealers you house allows![/b]</font> "; } else { if($totalddgain > $ir['maxdealers']){ echo"<font color = green>You used {$_POST['train']} energy, and successfully trained a total of $ddgain Drug Dealers.</font><font color = red>[b]NOTE: You are now at the highest amount of dealers that your house allows![/b]</font>"; $db->query("UPDATE users SET drugdealers={$ir['maxdealers']}, energy=$energyupdate WHERE userid=$userid"); } else { echo"<font color = green>You used {$_POST['train']} energy, and successfully trained a total of $ddgain Drug Dealers.</font>"; $db->query("UPDATE users SET drugdealers=drugdealers+$ddgain, energy=$energyupdate WHERE userid=$userid"); } } } } if($_POST['collect']) { if ($ir['ddcollections']==0){ echo"[b]<font color = red>Sorry! You dont have any collections left today! Come back tommorow![/b]</font>"; } else { if ($ir['brave'] != $ir['maxbrave']){ echo"[b]<font color = red>Sorry! You need to have full brave before you can collect from your drug dealers![/b]</font>"; } else { $db->query("UPDATE users SET money=$totcollect, ddcollections=ddcollections-1, brave=0 WHERE userid=$userid"); echo"<font color = green>[b]You have collected a total of $$collectgain! You now have {$ir['ddcollections']} collections left today.[/b]</font> "; } } } echo"<hr /> You currently have {$ir['drugdealers']} dealers working for you. The more drug dealers you have, the more profit you make when collecting from them. With your current house you can have [b]{$query1['maxdealers']}[/b] dealers working for you. When recruiting, more energy used gives you a higher chance of getting more dealers. Warning: if you sell downgrade your house after maxing dealers you will no longer be able to collect. You have {$ir['ddcollections']} dealer collections remaining today. Donators get 5 daily collections instead of 3. <form action='drugdealers.php' method='post'><input class='text' maxlength='5' size='4' value='{$ir['energy']}' name='train' /><input type='submit' value='Train Dealers' /></form> <form method='post'><input type='submit' class='button' name='collect' value='Collect Profit'></form> "; $h->endpage(); ?>   open estate.php, and find $db->query("UPDATE users SET money=money-{$np['hPRICE']},will=0,maxwill={$np['hWILL']} WHERE userid=$userid"); replace with: $db->query("UPDATE users SET money=money-{$np['hPRICE']},will=0,maxwill={$np['hWILL']},maxdealers={$np['maxdealers']} WHERE userid=$userid");   add to cron_day.php $db->query("UPDATE users SET ddcollections = 5 WHERE donatordays >= 1"); $db->query("UPDATE users SET ddcollections = 3 WHERE donatordays = 0");   Thats it all! (I think) If you have any bugs with it, post them and ill fix them if I can.
  18. Go make it then and sell it for $1 ;)
  19. tbh, theres nothing really to hack. There are no forms, no $_GET, no $_POST, no sessions...
  20. When after i bought a domain and hosting, and thought I could simply take the HTML codes form a game, and then I would have a fully functioning game XDXD
  21. yea I have noticed this... Thanks for the advice... thats why I was giving one free. But I may probally just sell this as a pack.
  22. Im here to offer the MWG community a buster of the hour modification for MCCodes v.1, and MCCodes v.2. So what is a "Buster Of The Hour Mod"? - The mobster with the most busts at the end of each hour will be rewarded with 100 crystals (easily changed). - When they win, there name will appear in the buster of the hour leader-boards for the next 24 hours. - Buster Of The Hour leaderboards will show the last 24 hours of buster of the hour, show who won it, and how many busts they won by. - Buster Of The Hour ALL TIME leaderboards... Shows the best ever buster of the hour wins. - Users can see how many busts they currently have in the current hour. - Explore add-on. Users can see who is the current buster of the hour and how many busts on explore page. (optional) What Files Are Included? -busterofthehour.php -cron_both.php -edit to prisonbust.php -edit to explore.php (optional) -Instructions This mod is extremely easy to install, and comes with full support from me. I also believe the mod is secured also. How To Buy PM me here and ill give you payment instructions Price: $3.00 NOTE: If you buy my Mobster Of The Hour mod, and Mugger Of The Hour Mod, you get this mod COMPLETELY FREE! Screenshots (NOTE: The folloing screenshots are for Mobster Of The Hour mod. Although, buster and mugger of the hour mods are EXACTLY the same only they run on busts, mugs instead) Optional
  23. Im here to offer the MWG community a mugger of the hour modification for MCCodes v.1, and MCCodes v.2. NOTE!!!: To use this mod to the full extent, you will need to already have a mug modification on your game. There are a few FREE ones on the MWG forums... Just use search. So what is a "Mugger Of The Hour Mod"? - The mobster with the most mugs at the end of each hour will be rewarded with 100 crystals (easily changed). - When they win, there name will appear in the mugger of the hour leader-boards for the next 24 hours. - Mugger Of The Hour leaderboards will show the last 24 hours of mugger of the hour, show who won it, and how many mugs they won by. - Mugger Of The Hour ALL TIME leaderboards... Shows the best ever mugger of the hour wins. - Users can see how many mugs they currently have in the current hour. - Explore add-on. Users can see who is the current mugger of the hour and how many mugs on explore page. (optional) What Files Are Included? -muggerofthehour.php -cron_mugoth.php -edit to mug.php -edit to explore.php (optional) -Instructions This mod is extremely easy to install, and comes with full support from me. I also believe the mod is secured also. How To Buy PM me here and ill give you payment instructions Price: $3.00 NOTE: If you buy my Mobster Of The Hour mod, and Buster Of The Hour Mod, you get this mod COMPLETELY FREE! Screenshots (NOTE: The folloing screenshots are for Mobster Of The Hour mod. Although, buster and mugger of the hour mods are EXACTLY the same only they run on busts, mugs instead) Optional
  24. I could probally make you something similar. How much are you offering? Or are you looking for a freebie?
  25. Screenshots added to post. I have also added 2 add-ons. All time leaderboards, and explore add-on... Enjoy...
×
×
  • Create New...