Jump to content
MakeWebGames

Haunted Dawg

Members
  • Posts

    2,933
  • Joined

  • Last visited

    Never
  • Days Won

    1

Everything posted by Haunted Dawg

  1. Re: [MCODES V2] Userids Probs Locate the problem (register.php, create new user) and sort it from there.
  2. Re: [MCODES V2] Userids Probs INSERT INTO `userstats (`userid`,`strength`,`agility`,`guard`,`labour`,`IQ`) VALUES (IDHERE, 10,10,10,10,10); And you will add multiple of those per the person ur adding.
  3. Re: [MCODES V2] Userids Probs If the ID is in the users table, then your variable or query is wrong. Do these users have stats in the userstats table? if not, thats your problem.
  4. Re: Help with Jailing   <?php $macropage="docrime.php?c={$_GET['c']}"; include "globals.php"; print "<div id='content'>"; if($ir['jail'] or $ir['hospital']) { die(" <prb>This page cannot be accessed while in jail or hospital.</prb> [url='index.php']> Home[/url]"); } $_GET['c']=abs((int) $_GET['c']); if(!$_GET['c']) { print " <prb>ERROR! - Invalid crime</prb> [url='index.php']> Home[/url]"; } else { $q=mysql_query("SELECT * FROM crimes WHERE crimeID={$_GET['c']}",$c); $r=mysql_fetch_array($q); if($ir['brave'] < $r['crimeBRAVE']) { print " <prb>You do not have enough Brave to perform this crime.</prb> [url='index.php']> Home[/url]"; } else { $ec="$sucrate=".str_replace(array("LEVEL","CRIMEXP","EXP","WILL","IQ"), array($ir['level'], $ir['crimexp'], $ir['exp'], $ir['will'], $ir['IQ']),$r['crimePERCFORM']).";"; eval($ec); print "<h1>".$r['crimeNAME']."</h1><hr width='90%' align='left' /> ".$r['crimeITEXT']."</p> "; $ir['brave']-=$r['crimeBRAVE']; mysql_query("UPDATE users SET brave={$ir['brave']} WHERE userid=$userid",$c); if(rand(1,100) <= $sucrate) { print " ".str_replace("{money}",$r['crimeSUCCESSMUNY'],$r['crimeSTEXT'])."</p>"; $ir['money']+=$r['crimeSUCCESSMUNY']; $ir['crystals']+=$r['crimeSUCCESSCRYS']; $ir['exp']+=(int) ($r['crimeSUCCESSMUNY']/8); mysql_query("UPDATE users SET money={$ir['money']}, crystals={$ir['crystals']}, exp={$ir['exp']},crimexp=crimexp+{$r['crimeXP']} WHERE userid=$userid",$c); if($r['crimeSUCCESSITEM']) { item_add($userid, $r['crimeSUCCESSITEM'], 1); } } else { if(rand(1, 2) == 1) { print "<p class='crimefail'>".$r['crimeFTEXT']."</p>"; } else { print "<p class='crimejail'>".$r['crimeJTEXT']."</p>"; $db->query("UPDATE `users` SET `jail` = '$r[crimeJAILTIME]', `jail_reason` = '$r[crimeJREASON]' WHERE `userid` = '$userid'"); $h->endpage(); exit; } } print " [url='docrime.php?c={$_GET[']> Try Again[/url]</p> [url='criminal.php']> Back to Crimes[/url]</p>"; } } $h->endpage(); ?>
  5. Re: Help with Jailing What he is saying is, it's "jail" not "jailed"
  6. Re: I accidently deleted my database and it wont read my backup? Ehm, actualy i've already tried most possible way's, the .doc file he has displays raw html code and is missing some of it.
  7. Re: [mccode] 8 Lines to secure your site from known sql injections. As nyna said, its like a lure into false security, this is just a quick way to eliminate the exploit of cmarket.php, forums.php (other markets also).
  8. Re: I accidently deleted my database and it wont read my backup? Strats, i am already helping this person. That message was not posted correctly, he thaught he would never be able to get it up again.. i came to rescue :P
  9. Re: [mccode] 8 Lines to secure your site from known sql injections. This was one of my attempts at "fix it all" type code, it work's but only secures 3 places..
  10. Re: [mccode] Simple user rating system v2 You do know that you have ending {$r['userid']}&action=goodrating'> </a> thats not being closed with "; ?
  11. Re: [mccode] Simple user rating system v2   With $ratingtot=$r['goodratings'] - $r['badratings']; echo "Ratings: [url='rating.php?ID={$r['][img=thumbsup.gif][/url] [b]"; if ($ratingtot >=0) {echo '<font color="green">';echo $ratingtot; echo '</font>';} else {echo '<font color="red">';echo $ratingtot; echo '</font>';} echo ' [/b][url='rating.php?ID={$r['] [img=thumbsdown.gif][/url]   Try that.
  12. Re: I accidently deleted my database and it wont read my backup? Use msn, it's faster for help, if you do.. [email protected] or email me the SQL backup along with details.
  13. Re: Using time? This:   if(!$ir['item_recieved']) { if(date('g') <= 7 && date('g') >= 9) { echo 'You landed it, and it is the right time! You just found item x'; item_add($ir['userid'], 59, 1); } }   Should be   if(!$ir['item_recieved']) { if(date('g') <= 7 && date('g') >= 9) { echo 'You landed it, and it is the right time! You just found item x'; item_add($ir['userid'], 59, 1); mysql_query("UPDATE `users` SET `item_recieved` = 1 WHERE `userid` = ".$ir['userid']); } }
  14. Re: Using time? No, date('g') is 7, date('h') is 07
  15. Re: [mccode] gang levels Your own fault you installed wrong.
  16. Re: [mccode v2] Search.php in one | Optimized Cluttered code, Displays nasty code at visitors, leaving you more vulnerable to exploit's.. finding what field is what, what table is what.
  17. Re: [mccode v2] Search.php in one | Optimized @ Faz: they can both be used, how ever, what do you prefer, speed or noncense? @ Assault: Who ever said "it is more secure" to you completly lied :lol: The class itself only handles error's for you in a more managable (faster fix) for you, how ever, my script has no mysql error's therfor no need for 'or die(mysql_error());' or $db->
  18. Re: [mc code V2]Updated Lottery $winner = rand(1,$jpSQL); $winnerSQL = sprintf("SELECT `userid` FROM `lottery` WHERE `id` = %d", abs((int)$winner)); $winnerQUERY = mysql_query($winnerSQL); $user = mysql_fetch_array($winnerQUERY); Could become $winnerSQL = mysql_query("SELECT `userid` FROM `lottery` ORDER BY RAND() LIMIT 1"); $user = mysql_fetch_assoc($winnerSQL);
  19. Re: Using time? Add the bellow code to header:   if(!$ir['item_recieved']) { if(date('g') <= 7 && date('g') >= 9) { echo 'You landed it, and it is the right time! You just found item x'; item_add($ir['userid'], 59, 1); } }   Run this SQL:   ALTER TABLE `users` ADD `item_recieved` TINYINT(2) NOT NULL DEFAULT '0';   Add this code to cron day:   mysql_query('UPDATE `users` SET `item_recieved` = 0 WHERE `item_recieved` = 1');
  20. Re: Using time? Ok, but you will need to add a cron & a sql field. I will post it all now :]
  21. Re: Using time? Add this bit:   $mt = mt_rand(1, 100); if($mt == 49) { if(date('g') <= 7 && date('g') >= 9) { echo 'You landed it, and it is the right time! You just found item x'; item_add($ir['userid'], 59, 1); } else { echo 'You landed it, but it just was not the right time.'; } } else { echo 'Damn, you never landed it! You landed '.$mt.'. You need a 49.'; }   To header and then they can get a chance per click on your game.
  22. Re: Using time? If you take away the mt_rand bit your member's will have fun by refreshing the page and gaining tons of these item's, and i can assure you, one can gain over a million items over 2 hour's.
  23. Re: Using time?   <?php include_once('globals.php'); $mt = mt_rand(1, 100); if($mt == 49) { if(date('g') <= 7 && date('g') >= 9) { echo 'You landed it, and it is the right time! You just found item x'; item_add($ir['userid'], 59, 1); } else { echo 'You landed it, but it just was not the right time.'; } } else { echo 'Damn, you never landed it! You landed '.$mt.'. You need a 49.'; } $h->endpage(); ?>   There i added some bit's to show which error message is showing.
  24. Re: problem when selling items Your most probably using in the query: Alex sold 1000 <font color='green'>Small Medikit(s)</font> for $300000 Which screws with the code.
  25. Re: Using time?   <?php include_once('globals.php'); if(mt_rand(1,100) == 49) { if(date('g') <= '7' && date('g') >= '9') { echo 'You just been given the item x'; item_add($ir['userid'], 59, 1); } } $h->endpage(); ?>   Try that one :P
×
×
  • Create New...