Jump to content
MakeWebGames

NarutoPRG.com

Members
  • Posts

    167
  • Joined

  • Last visited

Everything posted by NarutoPRG.com

  1. £30-40 Could get you a sort of decent coder, but I wouldn't trust people with your game who don't even deserve £10 for game security. :)   P.S: Jordan, abit cheap for you isn't it? I think your money in the £70-85 :P
  2. Hi there, Well I saw this newspaper on a game, and thought I might create the same. There might be another one around, but I haven't seen any, so what the heck. ---------------------- SQL'S:   [mysql]CREATE TABLE IF NOT EXISTS `paper` ( `content` longtext NOT NULL) ENGINE=MyISAM ; INSERT INTO `paper` VALUES('XXXXX');[/mysql]   [mysql]CREATE TABLE IF NOT EXISTS `npaper` ( `npID` int(11) NOT NULL auto_increment, `npADDER` int(11) NOT NULL default '0', `npTITLE` varchar(255) NOT NULL default '', `npBODY` text NOT NULL, `npTIME` int(11) NOT NULL default '0', PRIMARY KEY (`npID`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=20 ;[/mysql]   ----------------------   PHP Files: Create/replace newspaper.php with this code below:   require_once(DIRNAME(__FILE__) . '/globals.php'); echo ' Newspaper ';echo 'BLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAH';$q=$db->query("SELECT `content` FROM `paper` LIMIT 1");$content=$db->fetch_single($q);echo 'Player Advertisements | Buy An Advertisement For ???? |';if($ir['user_level'] > 2){echo " | DELETE ALL";}$anpdata=mysql_query("SELECT * FROM `npaper`");$q=mysql_query("SELECT `user_level` FROM `users` WHERE `userid` = '$userid'");echo ''; while($npdata=$db->fetch_row($anpdata)){$us=mysql_query("SELECT `username` FROM `users` WHERE `userid` = '{$npdata['npADDER']}'");$us=$db->fetch_single($us);$time=date('F j',$npdata['npTIME']);echo "Ad By: {$us} [{$npdata['npADDER']}] | Added On: {$time}";if($r['user_level'] != 2){echo " | DELETE";}echo " {$npdata['npTITLE']} {$npdata['npBODY']} ";}echo '';$q=mysql_query("SELECT `user_level` FROM `users` WHERE `userid`= '$userid'");$r=$db->fetch_row($q);if($r['user_level'] != 2){if($_GET['action'] == "all"){if($r['user_level'] != 2){mysql_query("TRUNCATE TABLE `npaper`");echo "Newspaper Ads All Cleared!";}}else if($_GET['action'] == "npID"){if($r['user_level'] != 2){mysql_query("DELETE FROM `npaper` WHERE `npID` = '{$_GET['npID']}'");echo "News Paper Ad ID {$_GET['npID']} deleted!";}}}if($_GET['action'] == "add"){echo 'Add Advertisement ($10,000)Ad Title: Ad Body: WARNING: Only plain text will work Do not advertise other games Follow the rules.';} if($_GET['action'] == "added"){if($ir['money']> 1) // Replace 1 with how much you want the advertisment to cost{echo 'ENTER YOUR CONGRADULATIONS '; // Remember to include how much you bought if for mysql_query("UPDATE `users` SET `money` = `money` - 1 WHERE `userid` = '$userid'");$title=str_replace(array("\n"),array(" "),strip_tags($_POST['npTITLE']));$body=str_replace(array("\n"),array(" "),strip_tags($_POST['npBODY']));$q=mysql_query("INSERT INTO `npaper` VALUES (NULL, '$userid', '$title', '$body', unix_timestamp())");echo "Advertisement was successfully added!";}else{print 'You don`t have enough money, sorry. xD Back';}}echo "Game News $content ";$h->endpage();?>   Find: staff_special.php Add in the cases.   case 'editnews': newspaper_form(); break;case 'subnews': newspaper_submit(); break;   And just above the CASE below from the new added cased, example:   case 'editnews': newspaper_form(); break;case 'subnews': newspaper_submit(); break;case 'XXXXXXX': X_XXX(); break; // ABOVE THIS!   Add:   function newspaper_form(){global $db,$ir,$c,$h,$userid;$q=$db->query("SELECT `content` FROM `paper` LIMIT 1");$news=$db->fetch_single($q);echo " Editing Newspaper $news ";}function newspaper_submit(){global $db,$ir,$c,$h,$userid;$news=$_POST['newspaper'];$db->query("UPDATE `paper` SET `content` = '$news'");echo 'Newspaper updated!';stafflog_add("Updated game newspaper");}   It's been fully tested, working no problems. But if some do appear, please comment or PM. :) Sorry, it comes out weird. :S Cheers, Rasheed Saeed
  3. Wait, what am I on about? What do you mean GAP? Maybe a screen shot could help. :)
  4. I think he's on about the "mainmenu.php" Empty. Try to work something out there.
  5. I like it. Plain and simple. Good use of colours, not stuck to the top of the page. Well done Richard. :thumbup:
  6. @ AlabamaHit: Thanks for the information. I'm not sure myself, I saw Djkanna use something on the line like that, but I personally think Wikipedia could sort us both out, lol. Thanks for the info again. @ Sniko: I'll take your work on this. NOTE: I never saw Djkanna use the ( ' ' ) numbers, so don't take judgement of him any. *Not you guys* ;)
  7. I saw a recent post from Djkanna, using the same techniques and he said it helps performance. Iv'e tried it on my mates TESTER game, seems to bring the speed up. :)
  8. Dave, you do have a point. It's free so no need to moan, but Darren is right, security does matter. If people get a free UN-secured mod & they have a secured say "MMC" (lol..), and that 1 file is a more chance of getting hacked. But, it's only around £2 to get it secured. So, yeah I am with you, but some security could be added, for the newbies sake. :) Find, this:   $ip = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];   Replace with:   $ip = $_SERVER['REMOTE_ADDR'];   Thank Jordan - Pudda for this. I've seen a recent post of this saying just use this. :) NOTE: I Don't know if this will secure your game BLAH or its just an IP detector or something with IP'S.
  9. OK, why are we getting into arguments? @ CJ - Twitch Thanks for the free header, looking good. All though, maybe securing it for the noobs who can't secure(like myself). Maybe securing it would be better for everyone. @ ROZ Any need? Really, I see you on most post's like this. -__- @ Danny Typical response, but what the hall, you make sense. :P
  10. Nope, just not good at PHP. ^^ But in a couple of months Ill be learning it, hopefully I can remember $_GET. :P
  11. $_GET. Yeah! I knew that. :| Lol, thanks Danny for the reminder :thumbup:
  12. Lol. If this is for your incoming MCC game. I'm sure CB or Dabs could help you through support & MSN. ;)
  13. Yet again, PHP knowledge is poor. Normally I see $GET_. But many more options could be used, I don't know. And if you can't work it out, try to work something out on the halloffame.php. It could help.
  14. 1 Thing!(and more..): I love the Usersbars stats, fantastic sorry to cry this out. But hell there amazing. Banner: Love the smudge/blur what ever you used on the font. :) Mainmenu: The colours don't really suit. Would be nice, if the Spike things were going into the Image. My main problem, its to open mate. Try to close it in. ;) Apart from that. Great work again Sniko. And agreed. You should get into graphics.
  15. Ah, thank you for the information. Really helped. ;)
  16. Personally, I use require_once('') or include_once(''). Mainly require_once(). As I see just using include() or require(), you just continueslly include the file you want, over & over again. Somehow like A loop. 8| I think this may slowdown your performance, event cause "lag" somehow, I don't know I make this stuff up, lol. But when using require_once() or include_once() your just asking to include that file ONCE. -------------- [mysql]$q=$db->query("SELECT u.*,c.* FROM users[/mysql] All I know of SQL so far that the * means your selecting all columns. So why use 2 stars? - Prove me wrong If I am, please do. Want to get as much knowledge. :) Also, for performance, [mysql]("UPDATE users SET break=1")[/mysql] Could be.. [mysql]("UPDATE `users` SET `break` = '1' ")[/mysql] Please tell me if I am wrong, and tell me how. Like I said, I want the knowledge. :P
  17. Correct me if I am wrong, but I've seen a few sprintf() around on a modification. And most tend to have ( before & ) at the end.   Example:   echo (sprintf("Rank: %s ", number_format(get_gamerank))); // Code for Crimgame   I might just be chatting on, but just curious. :P
×
×
  • Create New...