-
Posts
2,123 -
Joined
-
Last visited
-
Days Won
143
Content Type
Profiles
Forums
Events
Everything posted by Magictallguy
-
Re: Delete If you want to be able to credit yourself more than 2,147,483,647 then: Go into your File Manager Find staff_users.php In there find the code function credit_user_submit() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 3) { die("403"); } $_POST['money'] = (int) $_POST['money']; $_POST['crystals'] = (int) $_POST['crystals']; $db->query("UPDATE users u SET money=money+{$_POST['money']}, crystals=crystals+{$_POST['crystals']} WHERE u.userid={$_POST['user']}"); print "User credited."; $d=$db->query("SELECT username FROM users WHERE userid='{$_POST['user']}'"); $un=$db->fetch_single($d); stafflog_add("Credited $un [{$_POST['user']}] \${$_POST['money']} and/or {$_POST['crystals']} crystals."); } And replace with: function credit_user_submit() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 3) { die("403"); } $_POST['money'] = (float) $_POST['money']; $_POST['crystals'] = (float) $_POST['crystals']; $db->query("UPDATE users u SET money=money+{$_POST['money']}, crystals=crystals+{$_POST['crystals']} WHERE u.userid={$_POST['user']}"); print "User credited."; $d=$db->query("SELECT username FROM users WHERE userid='{$_POST['user']}'"); $un=$db->fetch_single($d); stafflog_add("Credited $un [{$_POST['user']}] \${$_POST['money']} and/or {$_POST['crystals']} crystals."); }
-
Re: Delete Why you would want to overdo your economy is above me..but fine.. Go into phpMyAdmin -> SQL ALTER TABLE `users` CHANGE `money` `money` INT( 12 ) NOT NULL DEFAULT '0', CHANGE `crystals` `crystals` INT( 12 ) NOT NULL DEFAULT '0', CHANGE `bankmoney` `crystals` INT( 12 ) NOT NULL DEFAULT '0', CHANGE `cybermoney` `crystals` INT( 12 ) NOT NULL DEFAULT '0'
-
Re: Delete Add into attackwon.php if ($ga['gangRESPECT']<=0 && $r['gang']) { $db->query("UPDATE users SET gang=0 WHERE gang={$r['gang']}"); $db->query("DELETE FROM gangs WHERE gangRESPECT<='0'"); $db->query("DELETE FROM gangwars WHERE warDECLARER={$ga['gangID']} or warDECLARED={$ga['gangID']}"); } ---- Add into attackbeat.php if ($ga['gangRESPECT']<=0 && $r['gang']) { $db->query("UPDATE users SET gang=0 WHERE gang={$r['gang']}"); $db->query("DELETE FROM gangs WHERE gangRESPECT<='0'"); $db->query("DELETE FROM gangwars WHERE warDECLARER={$ga['gangID']} or warDECLARED={$ga['gangID']}"); }
-
Re: Tutorial: v1 - v2 Conversion As true as this is, what many coder/programmers don't realise is that it's actually *much* safer to use the $db->query string instead of the mysql_query.. So.. v1 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']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); v2 include "globals.php"; ----------- v1 mysql_ v2 $db-> ------------ v1 fetch_array v2 fetch_row Much safer to use it that way.
-
Re: [Free] Password reset code You probably already covered this but in the v2 codes you don't get a mysql.php the closest thing to it that you get is config.php ... Would you be able to use that instead of the mysql?
-
[mccode] Ammunition For Weapons [$25.00]
Magictallguy replied to Cronus's topic in Paid Modifications
Re: [TGM] Ammunition For Weapons [TGM] Does this work on v2 PHP games? -
Re: [$10] Secure Password System Do you take pay by card? PayPal stopped working (I'm 16, gotta be 18 to use)
-
Re: [v1]Refill Users Crons mod....HAHAHAHA!! Good one! I'll convert to v2 for you soon!
-
[mccode] Improved Estate Agents for v2.0
Magictallguy replied to Ghetto's topic in Free Modifications
Re: [mccode] Improved Estate Agents for v2.0 Well it won't....This is v2! Look at page 1 near the bottom to find v1! -
Re: [mccode] Supporter Packs Ner ner!!! Oh wait...Neither do I! But I code for about 4!!
-
Re: [mccode] Supporter Packs I know this is annoying to see all over the place but...does anyone have this for v2?
-
Re: [FREE] Bodyguard V2.0 if thats for me i am spelling it right i spelt cronus'es Just to be awkward it would actually be Cronus'
-
[mccode v2] Crystal Reserve Mod FREE VERSION [/mccode v2]
Magictallguy replied to stryker's topic in Free Modifications
Re: [mccode v2] Crystal Reserve Mod FREE VERSION [/mccode v2] Probably forgot to change mysql_fetch_array() to rows() -
[mccode] Diamond gems, with a Diamondtemple.php for v2.0
Magictallguy replied to MDK666's topic in Free Modifications
Re: [mccode] Diamond gems, with a Diamondtemple.php for v2.0 And for those who want to add the diamond amount you have on hand to the game then look for this: Open header.php and find: [b]Crystals:[/b] {$ir['crystals']} Then add this: [b]Diamonds:[/b] {$ir['diamonds']} -
Re: FREE Bug Tracker Mod I'm bored so Oxi? You can have another +1!! (I've already given you a +1 but as I said I'm bored!!)
-
Re: [mccode] Close page system Well I have an HTML tester on my Owner Panel if anyone wants it?
-
Free New City Mod For v1 and lite
Magictallguy replied to RecklessCounty's topic in Free Modifications
Re: Free New City Mod For v1 and lite Or what you could try is this... Go into your admin panel (admin.php) and add in this underneath where all the case: whatever whatever; (); stuff is case "delcity": del_city(); break; case "delcitysub": del_city_sub(); break; case 'newcity': new_city(); break; case 'newcitysub': new_city_sub(); break; case 'editcity': edit_city(); break; case 'editcitysub': edit_city_sub(); break; case 'delcity': del_city(); break; case 'delcitysub': del_city_sub(); break; Add in the link wherer you want it [[url='newcity.php?action=newcity']Create New city[/url]] [[url='newcity.php?action=editcity']Edit City[/url]] [<a href='newcity.php?action=delcity'> And go to $h->endpage and paste this above function new_city() { global $ir, $c, $h, $userid; print "<h3>Create New City</h3> This will create a new city. <form action='newcity.php?action=newcitysub' method='post'> City name: <input type='text' name='cityname' /> City desc: <input type='text' name='citydesc' /> City min level <input type='text' name='cityminlevel' /> <input type='submit' value='Create New city' /></form>"; } function new_city_sub() { global $ir, $c, $h, $userid; $_POST['cityminlevel'] = abs((int)$_POST['cityminlevel']); mysql_query("INSERT INTO cities (cityname, citydesc, cityminlevel) VALUES ('{$_POST['cityname']}', '{$_POST['citydesc']}', '{$_POST['cityminlevel']}');", $c); print "[url='admin.php']> Back[/url]"; } function edit_city() { global $ir, $c, $h, $userid, $cityid; print "<h3>Edit City</h3> This will edit a city. <form action='newcity.php?action=editcitysub' method='post'> City City id: <input type='text' name='cityid' /> City Name EXACTLY as it appears: <input type='text' name='cityname' /> City desc: <input type='text' name='citydesc' /> City min level <input type='text' name='cityminlevel' /> <input type='submit' value='Edit city' /></form>"; } function edit_city_sub() { global $ir,$c,$h,$userid; mysql_query("UPDATE cities SET cityid='{$_POST['cityid']}',cityname='{$_POST['cityname']}', citydesc='{$_POST['citydesc']}', cityminlevel='{$_POST['cityminlevel']}' WHERE cityid='{$_POST['cityid']}'",$c); print "City edited..."; } function del_city() { global $ir, $c, $h, $userid, $cityid; print "<h3>Delete City</h3> This will delete a city. <form action='newcity.php?action=delcitysub' method='post'> City id: <input type='text' name='cityid' /> <input type='submit' value='Delete city' /></form>"; } function del_city_sub() { global $ir,$c,$h,$userid; mysql_query("DELETE FROM cities WHERE cityid='{$_POST['cityid']}'",$c); print "City deleted"; } and that's it! Nothing was changed apart from where to shove it! ;P -
Re: SQL Injections You got any defensive ideas about these? I just got hacked!!!
-
Re: [mccode] Owner Panel - Simple How about this <a href='http://.gamename.com/cpanel>cPanel</a><br/ > <a href='http://gamename.com/cpanel/path/to/your/file/manager>File Manager</a> <a href='http://gamename.com/cpanel/path/to/your/phpMyAdmin>phpMyAdmin/Database</a> That seems easier to me!! ;-P
-
Re: [mccode] Black Jack If a code has this in it: <?php 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(); Then it is v1 That can also be found in generalpage.php If it has globals.php instead of all that then it is v2!
-
Re: [mccode] View Donators I'M USING KYLE'S CODE HERE - NOTHING CHANGED. 1. Go into your public_html a.k.a www folder in the File Manager. 2. Click on 'Create New File' and call it viewdonators.php, then save it as an HTML Document 3. Click on that file you just created, click edit, and add in this code: <?php /*----------------------------------------------------- kyles donator users -----------------------------------------------------*/ 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']); $cm=money_formatter($ir['credits'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); print "<center> [b]<font color=red><h1>Donators</h1>[/b] <table width=75% border=1> <tr style='background:black'><th>User</th> <th>Level</th> <th>Money</th> <th>Donator days Left</th> <th><font color=white>Status</th> </tr>"; $q=mysql_query("SELECT * FROM users WHERE donatordays ORDER BY userid ASC", $c); while($r=mysql_fetch_array($q)) { if($r['laston'] >= time()-60*60) { $on="<font color=white>[b]Online[/b]</font>"; } else { $on="<font color=black>[b]Offline[/b]</font>"; } print "<tr> <td>[url='viewuser.php?u={$r[']<font color=red>[b]{$r['username']}[/b]</font>[/url] [{$r['userid']}]</td><td>{$r['level']}</td> <td>\${$r['money']}</td> <td>{$r['donatordays']}</td> <td>$on</td> </tr>"; } print "</table>"; $h->endpage(); ?> 4. Save the page by clicking save...dur. 5. Go to explore.php in your File Manager 6. Find this: [url='halloffame.php']Hall of Fame[/url] 7. Add underneath it [url='viewdonators.php']View Donators[/url] 8. Click save to save the file 9. Go to your game and have a look!! O_O There you go!! Happy now? Haha
-
[mccode] for any version copyright code
Magictallguy replied to KyleCrispy's topic in Free Modifications
Re: [mccode] for any version copyright code All documents, when saved are given a time-stamp. This can only be wrote once, if your $copy copyright has the time you made it, and it matches the time-stamp, there's your proof. There is some kind of program that can look into the time-stamps of a document. Police can do it no problem! ;-) -
mccode-v1 quantify items automatically
Magictallguy replied to seanybob's topic in Free Modifications
Re: [mccode] quantify items automatically Haha +1 for that...Needed to laugh! -
[mccode] [TGM] Delete Gang Option [TGM]
Magictallguy replied to Cronus's topic in Free Modifications
Re: [mccode] [TGM] Delete Gang Option [TGM] Nicely done!! Thanks...+1 -
Re: Fedjail cache Still, it's a good idea!! ;-)