Jump to content
MakeWebGames

MrGi

Members
  • Posts

    152
  • Joined

  • Last visited

    Never

Everything posted by MrGi

  1. Re: [MCCODES V2] Reset password + Secret question before password is sent. Just an idea, As Someone said before, About the newb spelling. Why not make it send to an email to confirm, and save there question. That way, They always have it on hand, Unless they are stupid and delete the mail.
  2. Re: [V2] Advertisements. Your right, Might have :P .. The code looks decent, Could have a few changes to it. But on a overall basis, I looked it over, It should work great!
  3. Re: [mccode v2] Advanced(isher) Level Upgrade Mod.   OMGZ!!! My game's full of variable's, does that mean im not secure against hack's? :o same :o damnit im going to get haxxored again >.< Depending on the way you use your variables. It can be safe to use them, Cause 90% of the "hackers" out there dont/cant use variables to hack. Although, Just take a run through your codes, if you are a good coder, You can tell whether or not your variables are in a secured form.
  4. Re: [V2] Advertisements. If im not mistaken, I Have seen this mod somewhere once before. Although, They might not be the same haha.. Good work, Not tested it out yet, But will soon!
  5. Re: [mccode v2] Advanced(isher) Level Upgrade Mod. You for one, Are using way to many variables in the code. Makes it more hackable to the user interface. You dont need to endpage deal, Cause your bracket per end of code has already closed.
  6. Re: Algorithm of all mafia games As i quote from my first post
  7. Re: Algorithm of all mafia games No, i didn't just google algorithms. Iv studied them many of times in the past. I was just saying that there was different types (which i explained for him) and then I am finding the specific example to go within he question of which he asked. Now if you would have read my post instead of criticising me over it you would have known.
  8. MrGi

    No Topic

    Re: No Topic Well id hate to see you go. You overall was a big help to promoting codes for the users on CE in which i did use some of yours. I apperciate it. And i wish you the best on php freaks!
  9. Re: Algorithm of all mafia games I can help alot on algorithm. Algorithm is used alot. More than what you can expect when using mccode. (the ones im posting are sorting algorithms.) I will post more of what you are looking for soon. But these might be helpful to some other CE members. You have various types of algorithm:   The bubble Sort Ascending/ Descending orders Selection Sort Insertion Sort Ill go over a bit of what each are, and then you can tell me which one protains mostly to your problem as i dont understand what your asking really. The Bubble Sort The bubble sort is an easy was to arrange data in ascending/descending order.The reason it is called the bubble sort algorithm is because it makes passes through and compares the elements of the array, certain values "bubble there way" toward the end of the array with each pass. The Selection Sort The selection sort usally performs fewer swaps than the bubble sort because it moves items immediately to thier final postion in the array. Here is how it works: The smallest value in the array is located and moved to element 0. Then, The next smallest value is located and moved to element 1. And so on and so forth. The Insertion Sort This one begins sorting the first 2 elements of the array you are using. It compares the elements and, if necessary, swaps them so they are in the proper order. As I said, I will post more of what you are looking for in a few. I need to re-read my algorithm workbook again. XD
  10. I look around, Reading the codes posted. Page after page, update after update. Change a name and call it yours. change a variable and act like you owned it. Cmon people.. There is about 50 re-makes of every fricken thing thats on here. Cant you newb coders act like you know something and code some pure orginal rather than changing a couple of lines from someone elses and call it yours? CE is here for various mods, Not 50 of the same one over and over and over again.   You all think you can code because you can change a variable or a couple of words. GET FRICKEN REAL. I can almost garuntee that 75% of you guys on CE cannot code a lick. Probally been coding for a couple of days and think you guys are big shit now. When I see that new people auctally post new mods, and I can see that the newbs can really code...Then i just might change my mind. Even though i dont post on here, I know i can code, and many others do to. I see people posting on here that I taught how to code. Or the basics. Cough cough Silent Assisanitor....Karlos.... Any comments? Have at it... Open topic, Say as you wish..
  11. Re: [Mccode V2] Improved Robbery[Mccode V2] Now, Create a file called carbuy.php and Add this : <?php /*----------------------------------------------------- -- Mono Country v1.0 BETA -- A product of DBS-entertainment -- Copyright held 2005 by Dabomstew -- INDEX.php -----------------------------------------------------*/ include "globals.php"; print "<h3>Car Yard</h3><hr />"; $car=abs((int) $_GET['car']); if($car) { $q=mysql_query("SELECT * FROM cars_types WHERE carID={$car} and carBUYABLE=1", $c); if(mysql_num_rows($q) == 0) { die("Invalid Car"); } $r=mysql_fetch_array($q); if($r['carCOST'] > $ir['money']) { die("You do not have enough money to buy this car."); } mysql_query("UPDATE users SET money=money-{$r['carCOST']},cars_owned=cars_owned+1 where userid=$userid", $c); mysql_query("INSERT INTO cars_playercars VALUES('', $userid, $car, 1, 1, 1, 1)", $c); print "You bought a {$r['carNAME']}! > [url='caryard.php']Back to Caryard[/url] > [url='garage.php']Goto Your Garage[/url] "; } else { print "<table width=100% border=6> <tr style='background:#cc9966'> <th>Car</th><th>Description</th><th>Base Acceleration</th><th>Base Handling</th><th>Base Speed</th><th>Base Shield</th><th>Price</th><th>Buy</th></tr>"; $q=mysql_query("SELECT * FROM cars_types WHERE carBUYABLE=1 ORDER BY carCOST", $c); while($r=mysql_fetch_array($q)) { $price='$'.number_format($r['carCOST']); print "<tr><td>{$r['carNAME']}</td><td>{$r['carDESC']}</td> <td>{$r['carACC']}</td> <td>{$r['carHAN']}</td><td>{$r['carSPD']}</td> <td>{$r['carSHD']}</td> <td>$price</td> <td>[url='caryard.php?car={$r[']Buy[/url]</td> </tr>"; } print "</table>"; } $h->endpage(); ?>   Now Create a File Called rob.php Add : <?php include "globals.php"; $luck = ($ir['level']) / 5; $crew = ($ir['crewmembers']) / $luck; $cashearn = $crew * 3; switch($_GET['action']) { case "buy": buy(); break; case "buycrew": buycrew(); break; default: index(); break; } print "<h3>Robbery</h3> [i]Hook up a robbery to earn some cash.[/i] [i]You currently have {$ir['crewmembers']}. If you get more crew members this means there is a higher chance you succeed with more cash![/i]"; function index() { global $db, $ir,$c,$userid,$h; if (['inv_item'] == 0) print" You dont have all the tools to do this yet!"; if (['cars_playerscars'] == 0) print"You Dont have a car!!!"; elseif{ (['inv_item'] == 98) elseif (['inv_item'] ==99) // The Items Numbers Here......EDIT THIS..you may add as many as you like... elseif (['inv_item']) ==100 elseif (['cars_playerscar'] == 1) print " [url='carbuy.php']Buy a Car[/url] [url='shops.php']Buy Your Tools Here[/url] [url='?action=buy']Buy Crew Members[/url] [url='?action=commit']Commit Robbery[/url] "; } } function buy() { global $db, $ir,$c,$userid,$h; print "Buying an extra crew member for $1000 [url='?action=buycrew']Buy a crew member ($1000)[/url] "; } function buycrew() { global $db, $ir,$c,$userid,$h; print "Buying A Crew Member "; if($ir['money'] < '1000') { print "<font color=red>Error!</font> You dont have enough for the crew member you need 1000 dollars [url='index.php']Back Home[/url] "; } if($ir['money'] > '999') { print "<font color=green>Success!</font> You buy a crew member for 1000 Dollars"; $db->query("UPDATE users SET money=money-1000 WHERE userid=$userid"); $db->query("UPDATE users SET crewmembers=crewmembers+1 WHERE userid=$userid"); } } if($_GET['action'] == 'commit') { print "Commiting The Robbery "; $chance=rand(1,2); if ($chance == 1) { print "<font color=green>Success!</font> The robbery goes to plan and you earn {$cashearn}!, All your crew members leave you as well!"; $db->query("UPDATE users SET money=money+{$cashearn}, crewmembers=0 WHERE userid=$userid"); } if ($chance == 2) { print "<font color=green>Fail!</font> The robbery doesnt go to plan all your crew members were shot down by S.W.A.T, only you managed to flee away!"; $db->query("UPDATE users SET crewmembers=0 WHERE userid=$userid"); } } ?>   Refer back to the first post. And Your done.. Once again any errors found or bugs or mis-halfs please post them up.
  12. Iv Taken Sniko's Robbery Mod, And tried my best to turn it into something great. So Here is how it works. In The rob.php file, Iv added were you must have a certain type of item(s) before even starting a robbery, Such as a bomb,lock picks, etc etc. How do you do it? Well, First off, Create a new shop. Name is Robbery Shop or Something of that matter. Then, Create you some items, Iv started out with a default number of 3 items. In rob.php file you will see where you add the itemID's. So anytime you add a new item and you want them to Have it before doing the robbery you just edit it there. Since I really have no- where to test this mod, Im going by my instincts that its mostly correct. Hopefully not to many things to worry about. And Im very sorry I havnt tested it, So if you will post errors here ill try my best to fix them. Now, To come down to this, Iv taken bits and pieces from the Cars_Mod and incorprated them into here. Such as, You must have a Car to get away. Iv edited them down to what i think is right for it. So Lets get started. First Off Lets Run out SQL's ALTER TABLE users ADD crewmembers INT(11) DEFAULT 0; -- -- Table structure for table `cars_playercars` -- CREATE TABLE `cars_playercars` ( `cpcID` int(11) NOT NULL auto_increment, `cpcPLAYER` int(11) NOT NULL default '0', `cpcCAR` int(11) NOT NULL default '0', PRIMARY KEY (`cpcID`) ) ENGINE=MyISAM AUTO_INCREMENT=161 DEFAULT CHARSET=latin1 AUTO_INCREMENT=161 ; -- -- Dumping data for table `cars_playercars` -- INSERT INTO `cars_playercars` VALUES (1, 166, 1, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (2, 432, 1, 2, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (73, 97, 7, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (58, 808, 5, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (23, 315, 3, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (6, 373, 3, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (7, 358, 3, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (9, 328, 2, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (10, 307, 1, 3, 2, 2, 2); INSERT INTO `cars_playercars` VALUES (11, 554, 3, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (12, 47, 5, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (29, 11, 5, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (14, 544, 5, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (15, 583, 3, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (16, 546, 1, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (20, 11, 1, 2, 2, 2, 2); INSERT INTO `cars_playercars` VALUES (19, 546, 3, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (157, 106, 6, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (33, 119, 2, 4, 3, 3, 1); INSERT INTO `cars_playercars` VALUES (26, 97, 1, 3, 3, 3, 3); INSERT INTO `cars_playercars` VALUES (27, 304, 6, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (28, 447, 6, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (30, 215, 3, 1, 1, 2, 1); INSERT INTO `cars_playercars` VALUES (31, 672, 1, 2, 1, 2, 1); INSERT INTO `cars_playercars` VALUES (32, 672, 1, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (40, 594, 1, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (35, 401, 4, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (36, 106, 1, 3, 3, 3, 2); INSERT INTO `cars_playercars` VALUES (37, 6, 1, 2, 2, 2, 2); INSERT INTO `cars_playercars` VALUES (41, 779, 5, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (42, 527, 4, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (43, 242, 5, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (44, 790, 5, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (47, 780, 1, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (46, 690, 20, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (50, 297, 8, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (54, 807, 6, 4, 4, 4, 3); INSERT INTO `cars_playercars` VALUES (104, 988, 8, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (56, 639, 6, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (57, 639, 11, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (145, 835, 12, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (62, 807, 22, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (63, 702, 1, 2, 1, 2, 1); INSERT INTO `cars_playercars` VALUES (64, 826, 1, 3, 3, 3, 3); INSERT INTO `cars_playercars` VALUES (66, 803, 1, 2, 2, 2, 2); INSERT INTO `cars_playercars` VALUES (74, 837, 1, 2, 2, 2, 2); INSERT INTO `cars_playercars` VALUES (100, 803, 6, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (121, 179, 1, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (75, 808, 3, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (76, 656, 5, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (77, 371, 6, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (79, 885, 7, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (83, 763, 1, 1, 1, 3, 1); INSERT INTO `cars_playercars` VALUES (84, 796, 6, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (85, 888, 1, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (113, 687, 5, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (87, 808, 7, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (88, 917, 1, 2, 2, 2, 2); INSERT INTO `cars_playercars` VALUES (89, 385, 8, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (90, 886, 6, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (92, 917, 7, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (96, 952, 3, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (94, 942, 3, 2, 2, 2, 2); INSERT INTO `cars_playercars` VALUES (97, 922, 1, 2, 2, 3, 2); INSERT INTO `cars_playercars` VALUES (98, 955, 3, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (146, 92, 20, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (102, 154, 6, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (103, 105, 8, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (105, 49, 9, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (106, 905, 7, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (107, 489, 7, 2, 2, 3, 2); INSERT INTO `cars_playercars` VALUES (108, 823, 5, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (111, 214, 3, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (122, 853, 7, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (137, 922, 4, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (147, 340, 5, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (117, 750, 3, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (140, 457, 1, 2, 2, 2, 1); INSERT INTO `cars_playercars` VALUES (119, 17, 7, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (123, 868, 1, 4, 4, 4, 4); INSERT INTO `cars_playercars` VALUES (124, 926, 5, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (141, 1096, 7, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (127, 868, 8, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (128, 930, 5, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (130, 414, 5, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (131, 1036, 7, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (132, 909, 1, 2, 2, 2, 2); INSERT INTO `cars_playercars` VALUES (133, 909, 2, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (134, 1077, 3, 2, 1, 2, 1); INSERT INTO `cars_playercars` VALUES (135, 1092, 1, 2, 1, 1, 2); INSERT INTO `cars_playercars` VALUES (150, 1099, 7, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (139, 1096, 6, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (142, 656, 7, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (143, 656, 6, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (144, 656, 1, 5, 4, 5, 4); INSERT INTO `cars_playercars` VALUES (148, 399, 2, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (149, 978, 6, 1, 1, 1, 1); INSERT INTO `cars_playercars` VALUES (156, 1154, 1, 3, 3, 3, 3); INSERT INTO `cars_playercars` VALUES (158, 735, 14, 1, 1, 1, 1);   Posting will continue/// ---------------->>>>>>>>>>>>>>>
  13. Re: [V2] Robbery Updated.. should work now
  14. Re: [V2] Robbery ******UPDATED*********   <?php include "globals.php"; $luck = ($ir['level']) / 5; $crew = ($ir['crewmembers']) / $luck; $cashearn = $crew * 3; switch($_GET['action']) { case "buy": buy(); break; case "buycrew": buycrew(); break; case "commit"; commit(); break; default: index(); break; } print "<h3>Robbery</h3> [i]Hook up a robbery to earn some cash.[/i] [b]You currenltly have {$ir['crewmembers']} meaning there is a higher chance you succeed with more cash!"; function index() { global $db, $ir,$c,$userid,$h; print "[url='{$_SERVER[']Buy Crew Members[/url] [url='{$_SERVER[']Commit Robbery[/url] "; } function buy() { global $db, $ir,$c,$userid,$h; print "Buying an extra crew member for $1000 [url='{$_SERVER[']Buy a crew member ($1000)[/url] "; } function buycrew() { global $db, $ir,$c,$userid,$h; print "Buying A Crew Member "; if($ir['money'] < '1000') { print "<font color=red>Error!</font> You dont have enough for the crew member you need 1000 dollars [url='index.php']Back Home[/url] "; } if($ir['money'] > '999') { print "<font color=green>Success!</font> You buy a crew member for 1000 Dollars"; $db->query('UPDATE users SET money = money - 1000 WHERE userid = $userid'); $db->query('UPDATE users SET crewmembers = crewmembers + 1 WHERE userid = $userid'); } } function commit() { global $db, $ir,$c,$userid,$h; print 'Commiting The Robbery "; if($ir['crewmembers'] == '0') { print "<font color=red>Error!</font> You dont have any crew members, This isnt a one man job! [url='index.php']Back Home[/url] "; } if($ir['crewmembers'] > '1') { $chance=rand(1,2); if ($chance == 1); { print "<font color=green>Success!</font> The robbery goes to plan and you earn {$cashearn}!, All your crew members leave you as well!"; $db->query('UPDATE users SET money = money + {$cashearn}, crewmembers = 0 WHERE userid = $userid'); } else { print "<font color=green>Fail!</font> The robbery doesnt go to plan all your crew members were shot down by S.W.A.T, only you managed to flee away!"; $db->query('UPDATE users SET crewmembers = 0 WHERE userid = $userid'); } } $h->endpage(); ?>
  15. Re: [mccode] Mining mod Plus One for me bud..That makes ya +25.... Yeah.. Wait till Nyna Posts..Haha..We will get the full info on it
  16. Re: [V2] crystal Temple okay, Well dont come in here bashing about how good yours is. He tried, and its decent...If you want to do better post it up...
  17. Re: [mccode v2] Login and Register Pages Very Nice Blue.. +1 for ya mate.
  18. Re: [V2] crystal Temple Iv been thinking on some ideas for weeks now.. Nothing really jumped at me if ya know what i mean haha
  19. Re: [V2] crystal Temple   Yes I know, I have different ways of coding than plenty others on CE...And im sure many other do to. I was just pointing it out haha...
  20. Re: [V2] crystal Temple no Problem mate.. Maybe one day me and you can get together and create a mod together..haha
  21. Re: [mccode] Mining mod I have yet to see errors with that command also. But another coder i use to know told me that using the brackets takes away from that??? Im really not sure on it, I was told along time ago about that Server Deal... Thats just what i use.. I figured i would post it up and see what the replys were anyways, Just to see if it really mattered..lol..In which i see it doesnt. Either Or, Great Clean-up on the script Zero.
  22. Re: [V2] crystal Temple Well For some odd reason, When he spaces his querys never fails that I get a error over it. I havnt really looked into spacing querys but whatever way you like to do it lol... Your Welcome Sniko... Iv had your back plenty of time on your mods, Haha...Good Work
  23. Re: [V2] crystal Temple Here is some fixes iv found, Not tested throughly but im sure it works. <?php // Upgraded Crystal Temple // Created By Sniko // 22 November 2008 // Free // Posted On CE For Free // Keep Above include "globals.php"; if($_GET['trade']) { print "<h3>Crystal Tradement</h3> <table border=2> <th>Trade For</th> <th>Description</th> <th>Trade</th> <tr> <td>Money</td> <td>$20 For One Crystal</td> <td>[url='?trade=money']Trade[/url]</td> <tr> <td>Level</td> <td>Upgrade One Level</td> <td><a href='?trade=level'>Trade</td> <tr> <td>Energy</td> <td>12 Crystals For Max Energy</td> <td>[url='?trade=energy']Trade[/url]</td> <tr> <td>Brave</td> <td>10 Crystals For Max Brave</td> <td>[url='?trade=brave']Trade[/url]</td> <tr> <td>Will</td> <td>100 Crystals For Max Will</td> <td>[url='?trade=will']Trade[/url]</td> <tr> <td>Strength</td> <td>5 Crystals For 50 Strength</td> <td>[url='?trade=str']Trade[/url]</td> <tr> <td>Defence</td> <td>5 Crystals For 50 Defence</td> <td>[url='?trade=def']Trade[/url]</td> <tr> <td>Agility</td> <td>5 Crystals For 50 Agility</td> <td>[url='?trade=agi']Trade[/url]</td> <tr> <td>IQ</td> <td>5 Crystals For 2 IQ</td> <td>[url='?trade=iq']Trade[/url]</td> <tr> <td>Location 2</td> <td>Travel To The 2nd Location (10 crystals)</td> <td>[url='?trade=loc']Trade[/url]</td> </table>"; if($_GET['trade'] == money) { if($ir['crystals'] < 1) { print "Error, you dont have enough crystals"; } else { print "You trade in 1 crystal for $20!"; $db->query("UPDATE users SET money = money + 20, crystals = crystals - 1 WHERE userid = $userid"); } } if($_GET['trade'] == level) { if($ir['crystals'] < 50) { print "Error, you dont have enough crystals (You need 50)"; } else { print "You trade in 1 crystal for a level enhancement!"; $db->query("UPDATE users SET level = level + 1, crystals = crystals - 50 WHERE userid = $userid"); } } if($_GET['trade'] == energy) { if($ir['crystals'] < 12) { print "Error, you dont have enough crystals"; } else { print "You trade in 12 crystal for max energy!"; $db->query("UPDATE users SET energy={$ir['maxenergy']},crystals=crystals-12 WHERE userid=$userid"); } } if($_GET['trade'] == brave) { if($ir['crystals'] < 12) { print "Error, you dont have enough crystals"; } else { print "You trade in 12 crystal for max brave!"; $db->query("UPDATE users SET brave={$ir['maxbrave']}, crystals=crystals-12 WHERE userid=$userid"); } } if($_GET['trade'] == will) { if($ir['crystals'] < 100) { print "Error, you dont have enough crystals"; } else { print "You trade in 100 crystal for max will!"; $db->query("UPDATE users SET will={$ir['maxwill']}, crystals=crystals-100 WHERE userid=$userid"); } } if($_GET['trade'] == str) { if($ir['crystals'] < 5) { print "Error, you dont have enough crystals"; } else { print "You trade in 5 crystal for 20 strength!"; $db->query("UPDATE userstats SET strength = strength + 20 WHERE userid = $userid"); $db->query("UPDATE users SET crystals = crystals - 5 WHERE userid = $userid"); } } if($_GET['trade'] == def) { if($ir['crystals'] < 5) { print "Error, you dont have enough crystals"; } else { print "You trade in 5 crystal for 20 defence!"; $db->query("UPDATE userstats SET defence = defence + 20 WHERE userid = $userid"); $db->query("UPDATE users SET crystals = crystals - 5 WHERE userid = $userid"); } } if($_GET['trade'] == agi) { if($ir['crystals'] < 5) { print "Error, you dont have enough crystals"; } else { print "You trade in 5 crystal for 20 agility!"; $db->query("UPDATE userstats SET aglility = agility + 20 WHERE userid = $userid"); $db->query("UPDATE users SET crystals = crystals - 5 WHERE userid = $userid"); } } if($_GET['trade'] == iq) { if($ir['crystals'] < 5) { print "Error, you dont have enough crystals"; } else { print "You trade in 5 crystal for 2 IQ!"; $db->query("UPDATE userstats SET iq = iq + 2 WHERE userid = $userid"); $db->query("UPDATE users SET crystals = crystals - 5 WHERE userid = $userid"); } } if($_GET['trade'] == loc) { if($ir['crystals'] < 10) { print "Error, you dont have enough crystals"; } if($ir['level'] < 5) print "Error, you are not the right level to travel to the 2nd location"; } else { print "You trade in 10 crystal to travel to the 2nd location!"; $db->query("UPDATE users SET crystals=crystals-10, location = 2 WHERE userid=$userid"); } } $h->endpage(); ?>   Every Code i fix for you mate its where you space your querys wrong..lol In the future instead of spacing your queries like: $db->query("UPDATE users SET crystals = crystals - 10, location = 2 WHERE userid = $userid"); Just Post them up like : $db->query("UPDATE users SET crystals=crystals-10, location = 2 WHERE userid=$userid");   Always get a error when you space your qqueries as you do.. Good Mod Mate. +1
  24. Re: [mccode] Mining mod Just as some info from another post i posted on. Once again instead of using .$_SERVER['PHP_SELF']. use {$_SERVER['PHP_SELF']} using .$_SERVER['PHP_SELF']. usally causes some confusion and errors within the script and to my point of view using {$_SERVER['PHP_SELF']} is a safer way to use the method. But thats the way i code and my opinion
  25. Re: [mccode] Killing License Haha, Id like to buy usershops...But umm thats money i dont have..lol..So why not give a brotha a copy to help improve it :P...
×
×
  • Create New...