-
Posts
2,140 -
Joined
-
Last visited
-
Days Won
148
Content Type
Profiles
Forums
Events
Everything posted by Magictallguy
-
Stop people from using IE on website
Magictallguy replied to Maxturbak's topic in Free Modifications
Re: Stop people from using IE on website I Think That Typing Like This Is, As You Call It; "Gay". Type normally, don't put something/someone down with that word. I know a few gay people, they're pretty cool, and I think they'd be offended if they were roped into the same class as code! -
Re: Userlist.php Thanks that works. What I was doing before you helped me was instead of using I just used us.XXX where XXX is the field in the table. Is there anything wrong with doing that? Just curious but the code you provided did work +1 Sp1d3r www.chaosrelic.com Nothing wrong with that at all. But, as I don't know which parts of the table you wish to display, I selected all. If you wish to speed up your code while using a MySQL query, only select what you need from a table instead of everything
-
Re: Userlist.php CE is so friggin' slow -.- Your method would disable the users ability to change the order clause.. Try using: $sql = sprintf("SELECT u.*, g.gangPREF, us.* " . "FROM users u " . "LEFT JOIN gangs g ON (u.gang = g.gangID) " . "LEFT JOIN userstats us ON (u.userid = us.userid) " . "ORDER BY u.%s %s LIMIT %u, 100", $by, $ord, $st); $q = $db->query($sql);
-
Re: Userlist.php The code is original v2 coding just FYI so theres no missing/special pieces if that helps. Sp1d3r www.chaosrelic.com Ah, I see why now too.. It's selecting the order by from the users link and that is selecting userid. userid exists in both the users and the userstats table - and that's why you're getting an error.. I can't think of a simple way to fix at the moment. Way too much on my mind.
-
[v1]Need abit of help with anouncements
Magictallguy replied to TheMafia!'s topic in General Discussion
Re: [v1]Need abit of help with anouncements If I'm right, the @ operator is to echo errors if the code is unable to do it's job properly (could be wrong).. <?php /* For this method, you would have to make an edit to the Admin Panel and the announcement.php. */ // Admin Panel edit // Add under the query that inserts the announcement into the database. mysql_query("UPDATE users SET new_announcements = new_announcements + 1") or die(mysql_error()); // Add in the announcement.php, underneath "print $content;" $sql = sprintf("UPDATE users SET new_announcements = 0 WHERE (userid = %u)", $userid); mysql_query($sql) or die(mysql_error()); // Then, the mainmenu edit is the same as the v2 version (posted below) ?> <?php // To be honest, I don't know.. I don't have a v1 source. That's on my 8gb pendrive. // If anyone finds my pendrive, I'll give you ?10! xD ?> <?php echo sprintf("[url='ann.php']%s (%u)[/url]", $ir['new_announcements'] ? "<span style='color:red;'>Announcements</span>" : "Announcements", $ir['new_announcements']); ?> -
Re: Userlist.php $sql = sprintf("SELECT u.*, g.gangPREF, us.* " . "FROM users u " . "LEFT JOIN gangs g ON (u.gang = g.gangID) " . "LEFT JOIN userstats us ON (u.userid = us.userid) " . "ORDER BY %s %s LIMIT %u, 100", $by, $ord, $st); $q = $db->query($sql);
-
Re: Filter Badwords! FREE! phpBB converted to MC Craps?
-
[mccode] Mod Sale [$10.00 - $95.00]
Magictallguy replied to Isomerizer's topic in Paid Modifications
Re: [mccode] Mod Sale [$10.00 - $110.00] Why overcomplicate things? I'm always telling you to keep things simple lol -
Re: Many mistakes PLEASE HELP I've already told you about that in your game.. It's your server. I offered to help you with that, but instead you became highly defensive.. So, you can bugger off. Have a nice day ;)
-
Re: Icons Help Don't you lot recognise the code he posted? It's part of Nyna's Icon mod - free too.. if ($f = u['gender']) { $t = sprintf("%s", $f == 'Male' ? 'Male; : 'Female'); $i[] = sprintf("[img=/%s.gif] ", $f, $t, $t); } Then simply create 2 images. Call them Male.gif and Female.gif - save of the work a lot there ;)
-
Re: can't delete forum topics. Find the start of the delete() function, and add $db to the globally defined variables
-
Re: game folder wriatble failed We know, but they're having a rant because they wish to express their feelings..
-
Hosp And Jail Change Background error
Magictallguy replied to HITMAN 17's topic in General Discussion
Re: Hosp And Jail Change Background error All code suggestions posted work fine. Make sure you are echoing the output for the users echo sprintf("<td style='background-color: %s;'>", $back); -
Re: 3 Revamps [V2] Create a directory called "itmpics" and upload into there!
-
Re: [mccode v2] Display Cabinet how could i fix this ? so it works :) You want just the query, not the bit stating it's a query Remove "SQL Query:"
-
Mccodes v2 - Jail,Hospital,Courses Timer
Magictallguy replied to shady9980's topic in General Discussion
Re: Mccodes v2 - Jail,Hospital,Courses Timer I have a countdown method, and it is in days, hours, minutes, and seconds - but it's not JavaScript. It's entirely PHP. Which means that the user would have to refresh to see the updated time.. -
Re: [V2] User List Question The ORDER clause goes AFTER the WHERE, not before $sql = sprintf( "SELECT u.*, g.* " . "FROM users u " . "LEFT JOIN gangs g ON (u.gang = g.gangID) " . "WHERE (u.location = %u) " . "ORDER BY %s %s LIMIT %u, 50", $ir['location'], $by, $ord, $st); $q = $db->query($sql); I would also suggest filtering what people order by... Try using &ord=blah somewhere in the URL..
-
Re: Hel with [v2] code error Chances are that you've included the global_func.php (or globals.php as that file include the global_func.php) more than once.
-
Re: Need Help With My Crimes, PLZ HELP! Ok, I've got a modification from the forums. It was a new crime layout - similar to Torn City's crime layout. But the problem is, I already have an advanced crime system and, when trying to install the new mod, it messed up. I am posting on here for any possible help Hey people! I'm having some trouble. When you commit a crime, it doesn't state the outcome (whether you have succeeded or not). Also, nothing is gained. Jail time, exp, money, etc. Is there something in the code that I need to change to rectify this? I've found out that it is the docrime.php that contains said error. Can someone please post the fixture? Can someone post a new docrime.php for me, so I can see if it works. Also, I don't know if advertising is ok, but the site it is on is Endless Wars. If you go onto there and attempt to commit a crime, you will see the outcome for yourself. PLEASE HELP ME :( And for the flip sake, learn English!
-
Re: [mccode V2] Ajax Shoutbox. [$12.00] Icons that you could use - should you want to.. - Ban - Delete
-
Looking for a one click attack system that works with V2
Magictallguy replied to Snatchy's topic in General Discussion
Re: Looking for a one click attack system that works with V2 Heck, I'd do it free.. -
Re: mccodes v1 lite fixes The codes themselves are free, and if you take a few hours to yourself, I'm sure you could do it no problem!
-
Re: Daily Donators Reward [Mccode v2] Properly secured <?php include(DIRNAME(__FILE__) . '/globals.php'); //Don't really know why I bothered securing this.. //I'm bored, need something to do -.- //Look at what I'm reduced to! xD //And for the love of God Almighty Himself, LEARN TO SPELL! //"Secured" by Magictallguy - very little to secure, mostly bug fixes.. if(!$ir['donatordays']) { echo "Sorry, This Feature is for Donators only!"; $h->endpage(); exit; } echo "<span style='text-align:center;'>Daily Donators Reward</span> <span style='font-style:italic;'>You can request a reward once a day</span> "; if(isset($_GET['reward'])) { if($ir['rewarddone'] > 1) { echo "You have already got your reward today! Come back tomorrow"); } $num = rand(1,3); $sql = sprintf("UPDATE users SET rewarddone = rewarddone + 1 WHERE (userid = %u)", $userid); $db->query($sql); //$ir['money'] = 100; //Is there really any need for this line? switch($num) { case 1: $money = rand(500,1000); echo sprintf("<span style='color:blue;'>You gained \$%s</span>", number_format($money)); $inc_money = sprintf("UPDATE users SET money = money + %u WHERE (userid = %u)", $money, $userid); $db->query($inc_money); break; case 2: $crystal = rand(5,10); echo sprintf("<span style='color:blue;'>You gained %u crystals</span>", $crystal); $inc_crystals = sprintf("UPDATE users SET crystals = crystals + %u WHERE (userid = %u)", $crystal, $userid); $db->query($inc_crystals); break; case 3: $brave = rand(1,3); echo "<span style='color:blue;'>You gained %u brave</span>"; $inc_brave = sprintf("UPDATE user SET brave = brave + %u WHERE (userid = %u)", $brave, $userid); $db->query($inc_brave); break; } } echo "<span style='text-align:center;'>[url='reward.php?reward=?']Reward[/url]</span>"; $h->endpage(); ?>
-
Re: Daily Donators Reward [Mccode v2] It's a more secure way to include the file, as it's a direct and definate path to the file..
-
Re: Forum Help. V2 I thin k.. An easy fix, the $db variable hasn't been globally defined. Find global $ir,$c,$h,$userid; - or something like that - above it (in the same function) And add $db