Jump to content
MakeWebGames

Nicholas

Members
  • Posts

    467
  • Joined

  • Last visited

Everything posted by Nicholas

  1. good idea, but cba to do it as ive already set up my game to change links in preferences for the confirm link or just normal click "USE" link to use the item without the confirm bit. if thats understandable lol.
  2. why wont you beable to test the cron? run it manually to test it? unless you already got a weekly cron set up, make another file but change name of it. then add the cron to the database bit and run it manually for tests... to run it manually just type for example say in config.php the "code" was 1a2b3c type this URL in address bar for say for example "cron_day.php" /cron_day.php?code=1a2b3c and it will run it manually.
  3. is there any chance you can help me by recoding it for me to make it work? it will be very greatful. :) i know it sounds like im asking you to do all the work for me... but i just cant think of anything on how to get this script to work lol.
  4. try using this? *NOT TESTED RECODED ON HERE* <?php include "globals.php"; $_GET['u']= isset($_GET['u']) && is_numeric($_GET['u']) ? abs(intval($_GET['u'])) : false; $q=$db->query("SELECT * FROM competitions WHERE id=".abs(intval($_GET['u'])).""); if($db->num_rows($q) == 0) { print "Invalid Competition"; } else { $r=$db->fetch_row($q); if($ir['money'] < 49999) { print "You dont have enough money to enter this competition."; $h->endpage(); exit(); } if($ir['money'] > 49999) { print "You have entered the competition [b]{$r['name']}[/b] Entering costed you \$".number_format($r['fee'])." ".number_format($r['entrys'])." people have entered this competition."; $db->query("UPDATE users SET money=money-50000 WHERE userid=$userid"); $db->query("UPDATE competitions SET profit=profit+{$r['fee']} WHERE id=".abs(intval($_GET['u'])).""); $db->query("INSERT INTO compentrys VALUES('',$userid)"); } else { print "You do not have enough money to join this competition."; } ?>   if it doesnt work like shows blank page change $_GET['u']= isset($_GET['u']) && is_numeric($_GET['u']) ? abs(intval($_GET['u'])) : false;   into $_GET['u'] = abs(intval($_GET['u']));   see if that works.
  5. huh? i dont get what you mean? lol.
  6. yes im trying to get a logs system for my lottery system. also i know about that insertation query, it was just an example. but like i said... i just cant think of how to create this stupid logs system, my mind just wont connect and remember how to do it lol. in Function ID() i changed $get_wins = sprintf("SELECT `ID`, `username`, `amount` FROM lotterywins"); into $get_wins = sprintf("SELECT `ID`, `username`, `amount` FROM lotterywins WHERE (`ID` = ".abs(intval($_GET['ID'])).")); but the page just refreshes when i click on the raffle ID on Function Index() cant get it to work...
  7. lmao both my games allow males to marry males females to marry females males to marry females females to marry males its a game... you can do what you wish, if its yours... ive seen text based games out there that are for 18+ (rude pics and etc on it) trust me you cant get sued for that... ________________________________________________________ idk why that player said that because its about say... 80% males that play text-based games and other 20% are females as if you think about it, i bet you have LOADS more males than females signing up lol. ________________________________________________________ if you only allowed males to marry females or other way around, most your players never get married lol.
  8. find } $h->endpage(); ?>   and replace it with } } $h->endpage(); ?>   see if that works m8. an unexpected $end error means its missing a } somewhere in the script, that error is usually done by a } else { bit lol. just try adding a } on top of the ?> 7 out 10 its normally that. lol.
  9. find $db->query("UPDATE competitions SET profit=profit+{$r['fee']} WHERE id={'$_GET['u']}"); replace it with $db->query("UPDATE competitions SET profit=profit+{$r['fee']} WHERE id=".abs(intval($_GET['u']))."");   try that mate.
  10. i use this to stop people from fedding admins lol. (yes AlabamaHit is correct V2 has a file set up to stop players fedding staff...) call it "jailuser.php" <?php include "globals.php"; if($ir['user_level'] != 2 && $ir['user_level'] != 3 && $ir['user_level'] != 4 && $ir['user_level'] != 5) { echo "You cannot fed jail users."; $h->endpage(); exit(); } if($_POST['user']) { global $ir,$c,$h,$userid; $q=$db->query("SELECT * FROM users WHERE userid={$_POST['user']}"); $them=$db->fetch_row($q); if($them['user_level'] == 2) { echo "You cannot fed jail admins."; $h->endpage(); exit(); } $db->query("UPDATE users SET fedjail=1 WHERE userid={$_POST['user']}"); $db->query("INSERT INTO fedjail VALUES('',{$_POST['user']},{$_POST['days']},$userid,'". mysql_real_escape_string($_POST['reason'],$c)."')"); echo "User Fed Jailed."; $db->query("INSERT INTO jaillogs VALUES('',$userid, {$_POST['user']}, {$_POST['days']}, '{$_POST['reason']}',unix_timestamp())"); stafflog_add("Fedded ID {$_POST['user']} for {$_POST['days']} days"); } else { global $ir,$c,$h,$userid; echo "<h3>Jailing User</h3> The user will be put in fed jail and will be unable to do anything in the game. <form action='jailuser.php' method='post'> User: ".user_dropdown($c,'user',$_GET['userid'])." Days: <input type='text' name='days' /> Reason: <input type='text' name='reason' /> <input type='submit' value='Jail User' /></form>"; } $h->endpage(); ?>   in "viewuser.php" this is the link you can use [url='jailuser.php?userid=".abs(intval($r[']Jail User[/url]   remove this function from staff_punit.php (should be near top) function fed_user_form() { global $db,$ir,$c,$h,$userid; print "<h3>Jailing User</h3> The user will be put in fed jail and will be unable to do anything in the game. <form action='staff_punit.php?action=fedsub' method='post'> User: ".user_dropdown($c,'user',$_GET['XID'])." Days: <input type='text' name='days' /> Reason: <input type='text' name='reason' /> <input type='submit' value='Jail User' /></form>"; } function fed_user_submit() { global $db,$ir,$c,$h,$userid; $re=$db->query("UPDATE users SET fedjail=1 WHERE userid={$_POST['user']}"); if($db->affected_rows()) { $db->query("INSERT INTO fedjail VALUES('',{$_POST['user']},{$_POST['days']},$userid,'". $_POST['reason']."')"); } $db->query("INSERT INTO jaillogs VALUES('',$userid, {$_POST['user']}, {$_POST['days']}, '{$_POST['reason']}',unix_timestamp())"); print "User jailed."; stafflog_add("Fedded ID {$_POST['user']} for {$_POST['days']}"); }   there should be a "mailban.php" too... incase you dont have it... <?php include "globals.php"; if($ir['user_level'] != 2 && $ir['user_level'] != 3 && $ir['user_level'] != 4 && $ir['user_level'] != 5) { echo "You cannot mailban users."; $h->endpage(); exit(); } if($_POST['user']) { global $ir,$c,$h,$userid; $q=$db->query("SELECT * FROM users WHERE userid={$_POST['user']}"); $them=$db->fetch_row($q); if($them['user_level'] == 2) { echo "You cannot mailban admins."; $h->endpage(); exit(); } $re=$db->query("UPDATE users SET mailban={$_POST['days']},mb_reason='{$_POST['reason']}' WHERE userid={$_POST['user']}"); event_add($_POST['user'],"You were banned from mail for {$_POST['days']} day(s) for the following reason: {$_POST['reason']}",$c); stafflog_add("Mail Banned ID {$_POST['user']} for {$_POST['days']} days"); echo "User Mail Banned"; } else { echo "<h3>MailBan User</h3> This user wont be able to access mail box for days. Do not abuse! <form action='mailban.php' method='post'> User: ".user_dropdown($c,'user',$_GET['userid'])." Days: <input type='text' name='days' value='1'/> Reason: <input type='text' name='reason' /> <input type='submit' value='Mailban User' /></form>"; } $h->endpage(); ?>   in "viewuser.php" this is the link you can use [url='mailban.php?userid=".abs(intval($r[']Mailban User[/url]   remove this function from "staff_punit.php" function mail_user_form() { global $db,$ir,$c,$h,$userid; print "<h3>Mail Banning User</h3> The user will be banned from the mail system. <form action='staff_punit.php?action=mailsub' method='post'> User: ".user_dropdown($c,'user',$_GET['ID'])." Days: <input type='text' name='days' /> Reason: <input type='text' name='reason' /> <input type='submit' value='Mailban User' /></form>"; } function mail_user_submit() { global $db,$ir,$c,$h,$userid; $_POST['reason']=$_POST['reason']; $re=$db->query("UPDATE users SET mailban={$_POST['days']},mb_reason='{$_POST['reason']}' WHERE userid={$_POST['user']}"); event_add($_POST['user'],"You were banned from mail for {$_POST['days']} day(s) for the following reason: {$_POST['reason']}",$c); print "User mail banned."; stafflog_add("Mail banned User ID {$_POST['user']} for {$_POST['days']} days"); }   i created the "forumban.php" as V2 hasnt created one but here it is... <?php include "globals.php"; if($ir['user_level'] != 2 && $ir['user_level'] != 3 && $ir['user_level'] != 4 && $ir['user_level'] != 5) { echo "You cannot forum ban users."; $h->endpage(); exit(); } if($_POST['user']) { global $db,$ir,$c,$h,$userid; $q=$db->query("SELECT * FROM users WHERE userid={$_POST['user']}"); $them=$db->fetch_row($q); if($them['user_level'] == 2) { echo "You cannot forum ban admins."; $h->endpage(); exit(); } $_POST['reason']=$_POST['reason']; $re=$db->query("UPDATE users SET forumban={$_POST['days']},fb_reason='{$_POST['reason']}' WHERE userid={$_POST['user']}"); event_add($_POST['user'],"You were banned from the forums for {$_POST['days']} day(s) for the following reason: {$_POST['reason']}",$c); echo "User Forum Banned."; stafflog_add("Forum banned User ID {$_POST['user']} for {$_POST['days']} days"); } else { global $db,$ir,$c,$h,$userid; echo "<h3>Forum Banning User</h3> The user will be forum banned and will be unable to do anything in the game forum. <form action='forumban.php' method='post'> User: ".user_dropdown($c,'user',$_GET['userid'])." Days: <input type='text' name='days' size='1' value='1' class='inputback'/> Reason: <input type='text' name='reason' class='inputback'/> <input type='submit' value='Forum Ban User' class='inputback'/></form>"; } $h->endpage(); ?>   in "viewuser.php" this is the link you can use [url='forumban.php?userid=".abs(intval($r[']ForumBan User[/url]   remove this function from "staff_punit.php" function forum_user_form() { global $db,$ir,$c,$h,$userid; print "<h3>Forum Banning User</h3> The user will be banned from the forums. <form action='staff_punit.php?action=forumsub' method='post'> User: ".user_dropdown($c,'user',$_GET['ID'])." Days: <input type='text' name='days' /> Reason: <input type='text' name='reason' /> <input type='submit' value='Forumban User' /></form>"; } function forum_user_submit() { global $db,$ir,$c,$h,$userid; $_POST['reason']=$_POST['reason']; $re=$db->query("UPDATE users SET forumban={$_POST['days']},fb_reason='{$_POST['reason']}' WHERE userid={$_POST['user']}"); event_add($_POST['user'],"You were banned from the forums for {$_POST['days']} day(s) for the following reason: {$_POST['reason']}",$c); print "User forum banned."; stafflog_add("Forum banned User ID {$_POST['user']} for {$_POST['days']} days"); }   then you be fine from admins getting fedded, mail banned or forum banned. lol. NOTE: i recoded this on here so you could get some errors lol. NOTE: this isnt secured fully. cba to do it lol
  11. im trying to make a logs system for my lottery mod. but i think ive done the file completely wrong im trying to make it similar to RogueVampires but without the 10 winners just 1 winner also without the lottery ticket number that won it... just the Name of the player and amount they won. this is rougevampires main page of the logs http://www.roguevampires.net/raffle_winners.php which out how mine is set up and works... but... when you click on a raffle ticket that has been completed for example raffle 17616 has been completed. the link says this once clicked on "Raffle 17616" http://www.roguevampires.net/raffle_winners.php?id=17616 on my game with this sql below; it say everything kinda like how RogueVampires has up it. but my link is. http://www.criminal-madness.co.uk/lottery_win.php once on that page it say this... Last 25 Lottery Tickets Wins Raffle 2 Raffle 1 but when you click on say "Raffle 2" it just stay on the same page but the link says http://www.criminal-madness.co.uk/lottery_win.php?ID=2 if anyone can help me with this file it be great. my coding mind has gone elsewhere for while now and i cant think of anything about coding lol... if you can... could you recode it for me so its better... doesnt have to be secure as i can do that bit but i just cant figure out how to create the stupid file... as i dont think its meant to be in Functions lol.   CREATE TABLE IF NOT EXISTS `lotterywins` ( `ID` int(11) NOT NULL auto_increment, `username` varchar(255) NOT NULL, `amount` int(11) NOT NULL, PRIMARY KEY (`ID`), UNIQUE KEY `ID` (`ID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; INSERT INTO `lotterywins` (`ID`, `username`, `amount`) VALUES (1, 'Blade Runner', 1000), (2, 'Blade Runner', 1000);   NOTE: i inserted these SQL into the database myself thro the database, not thro a cron file. but it shouldnt be hard to create the insertation for these really should it? it be something like this for example... $db->query("INSERT INTO lotterywins VALUES (''{$r['ID']}, {$ir['username']}, {$r['amount']}");   <?php include "globals.php"; $_GET['ID'] = (isset($_GET['ID']) && is_string($_GET['ID'])) ? stripslashes(trim($_GET['ID'])) : FALSE; switch($_GET['ID']) { case 'ID': ID(); break; default: index(); break; } function index() { global $db,$ir,$c,$h,$userid; print "<h2>Last 25 Lottery Tickets Wins</h2>"; print "<center><table width='18%' cellspacing='1' class=table border='1' bordercolor='#636363'></center>"; $get_wins = sprintf("SELECT `ID` FROM lotterywins ORDER BY `ID` DESC LIMIT 25"); $do_wins = $db->query($get_wins); while($wins = $db->fetch_row($do_wins)) { print "<tr>"; print "<td align='center'>[url='lottery_win.php?ID=".abs(intval($wins[']Raffle ".number_format($wins['ID'])."[/url]</td>"; print "</tr>"; } print "</table>"; } function ID() { global $db,$ir,$c,$h,$userid; print "<center><table width='50%' cellspacing='1' class=table border='1' bordercolor='#636363'></center>"; print "<tr>"; print "<th width='25%'>Name</th>"; print "<th width='25%'>Amount</th>"; print "</tr>"; $get_wins = sprintf("SELECT `ID`, `username`, `amount` FROM lotterywins"); $do_wins = $db->query($get_wins); while($wins = $db->fetch_row($do_wins)) { print "<tr>"; print "<td align='center'>".stripslashes($wins['username'])."</td>"; print "<td align='center'>".number_format($wins['amount'])."</td>"; print "</tr>"; } print "</table>"; } $h->endpage(); ?>
  12. not sure if this is what you mean but maybe you mean this? run this sql ALTER TABLE `settings` ADD `staff_pad1` INT(11) NOT NULL DEFAULT ' ';   find this in staff.php (near bottom) print "<h3>Staff Notepad</h3><hr />"; if($_POST['pad']) { $db->query("UPDATE settings SET conf_value='{$_POST['pad']}' WHERE conf_name='staff_pad'"); $set['staff_pad']=stripslashes($_POST['pad']); print "[b]Staff Notepad Updated![/b]<hr />"; } print "<form action='staff.php' method='post'> <textarea rows='10' cols='60' name='pad'>".htmlspecialchars($set['staff_pad'])."</textarea> <input type='submit' value='Update Notepad' /></form>";   replace it with print "<h3>Staff Notepad 1</h3><hr />"; if($_POST['pad']) { $db->query("UPDATE settings SET conf_value='{$_POST['pad']}' WHERE conf_name='staff_pad'"); $set['staff_pad']=stripslashes($_POST['pad']); print "[b]Staff Notepad 1 Updated![/b]<hr />"; } print "<form action='staff.php' method='post'> <textarea rows='10' cols='60' name='pad'>".htmlspecialchars($set['staff_pad'])."</textarea> <input type='submit' value='Update Notepad 1' /></form> "; print "<h3>Staff Notepad 2</h3><hr />"; if($_POST['pad1']) { $db->query("UPDATE settings SET conf_value='{$_POST['pad1']}' WHERE conf_name='staff_pad1'"); $set['staff_pad1']=stripslashes($_POST['pad1']); print "[b]Staff Notepad 2 Updated![/b]<hr />"; } print "<form action='staff.php' method='post'> <textarea rows='10' cols='60' name='pad'>".htmlspecialchars($set['staff_pad1'])."</textarea> <input type='submit' value='Update Notepad 2' /></form>";   might be wrong tho. lol. so back up the file first.
  13. wasnt you the one that asked someone to create this for you on dev-forum? lol. also this peace mod is different... but also if you do the peace gang the way your talking about, everyones gangs have peace mode on, then gangs be useless really lol. ________________________________________________________________ also i dont think i can ever make a mod like this again... i think i was quite lucky on this one lol. ive only made simple mods before.
  14. hi this mod took me very long time, and might still have bugs on it lol. but it shouldnt ;) first add the sql into the database... CREATE TABLE IF NOT EXISTS `gangpeace` ( `peaceID` int(11) NOT NULL auto_increment, `peaceACCEPTER` int(11) NOT NULL default '0', `peaceASKER` int(11) NOT NULL default '0', `peaceDAYS` int(11) NOT NULL default '0', PRIMARY KEY (`peaceID`) ) ENGINE=MyISAM; CREATE TABLE IF NOT EXISTS `gangask` ( `askID` int(11) NOT NULL auto_increment, `askWAR` int(11) NOT NULL default '0', `askWHO` int(11) NOT NULL default '0', `askTO` int(11) NOT NULL default '0', PRIMARY KEY (`askID`) ) ENGINE=MyISAM;   then find in yourgang.php default: gang_staff_idx(); break;   and on top of it put this. case "peace": gang_staff_peace(); break; case "viewpeace": gang_staff_viewpeace(); break;   then... find ?> and put this on top of it. function gang_staff_peace() { global $db,$ir,$c,$userid,$gangdata; if(!isset($_POST['ask'])) { print "<form action='yourgang.php?action=staff&act2=peace' method='post'> Choose which gang you want to have peace with. <input type='hidden' name='ask' value='submit'> Gang: <select name='war' type='dropdown'>"; $war=$db->query("SELECT `warID`, `warDECLARER`, `warDECLARED` FROM gangwars where warDECLARER={$ir['gang']} or warDECLARED={$ir['gang']}"); while($r=$db->fetch_row($war)) { if($gangdata['gangID'] == $r['warDECLARER']) { $w="You";$f="warDECLARED"; } else { $w="Them";$f="warDECLARER"; } $d=date('F j, Y, g:i:s a',$r['warTIME']); $select=$db->query("SELECT `gangID`, `gangNAME` FROM gangs WHERE gangID=".$r[$f]); $them=$db->fetch_row($select); print "<option value='{$r['warID']}'>{$them['gangNAME']}</option>"; } print "</select> <input type='submit' value='Ask For Peace'></form>"; } else { $_POST['war'] = abs((int) $_POST['war']); $war=$db->query("SELECT `warID`, `warDECLARER`, `warDECLARED` FROM gangwars where warID={$_POST['war']}"); $r=$db->fetch_row($war); if($gangdata['gangID'] == $r['warDECLARER']) { $w="You";$f="warDECLARED"; } else { $w="Them";$f="warDECLARER"; } $db->query("INSERT INTO gangask VALUES('',{$_POST['war']},{$ir['gang']},".$r[$f].")"); $select=$db->query("SELECT `gangID` FROM gangs WHERE gangID=".$r[$f]); $them=$db->fetch_row($select); $event=str_replace("'","''","[url='gangs.php?action=view&ID={$ir[']{$gangdata['gangNAME']}[/url] have asked for peace from the war."); $db->query("INSERT INTO gangevents VALUES('',{$ir['gang']},unix_timestamp(),'$event') , ('',".$r[$f].",unix_timestamp(),'$event')"); print "You have asked for peace."; } } function gang_staff_viewpeace() { global $db,$h,$ir,$c,$userid,$gangdata; if(!isset($_POST['ask'])) { echo "<form action='yourgang.php?action=staff&act2=viewpeace' method='post'> Choose who to accept peace with for 7 days. <input type='hidden' name='ask' value='submit'> Gang: <select name='war' type='dropdown'>"; $sql = sprintf("SELECT s.*, w.* " . "FROM gangask s " . "LEFT JOIN gangwars w ON (s.askWAR = w.warID) " . "WHERE (askTO = %u)", $ir['gang']); $wq = $db->query($sql); while($r = $db->fetch_row($wq)) { $w = ($gangdata['gangID'] == $r['warDECLARER']) ? "You" : "Them"; $f = ($gangdata['gangID'] == $r['warDECLARER']) ? "warDECLARED" : "warDECLARER"; $SelectGangs = sprintf("SELECT * FROM gangs WHERE (gangID = %u)", $r[$f]); $ggq = $db->query($SelectGangs); $them = $db->fetch_row($ggq); echo sprintf("<option value='%u'>%s</option>", $r['askID'], stripslashes($them['gangNAME'])); } echo "</select> <input type='submit' value='Accept Peace Offer'></form> <form action='yourgang.php' method='post'> <input type='submit' value='Go Back'></form>"; } else { $_POST['war'] = abs(@intval($_POST['war'])); $SelectWar = sprintf("SELECT askWAR FROM gangask WHERE (askID = %u)", $_POST['war']); $q = $db->query($SelectWar); if(!$db->num_rows($q)) { echo "Invalid peace offer. <form action='yourgang.php' method='post'> <input type='submit' value='Go Back'></form>"; $h->endpage(); exit; } $war = $db->fetch_row($q); $SelectGangWars = sprintf("SELECT * FROM gangwars WHERE (warID = %u)", $war['askWAR']); $wq = $db->query($SelectGangWars); if($db->num_rows($wq) == 0) { echo "Invalid Gang. <form action='yourgang.php' method='post'> <input type='submit' value='Go Back' class='inputback'/></form>"; exit; } $r = $db->fetch_row($wq); $w = ($gangdata['gangID'] == $r['warDECLARER']) ? "You" : "Them"; $f = ($gangdata['gangID'] == $r['warDECLARER']) ? "warDECLARED" : "warDECLARER"; $AcceptPeace = sprintf("DELETE FROM gangask WHERE (askID = %u)", $_POST['war']); $InsertPeace = sprintf("INSERT INTO gangpeace VALUES('',%u, %u, %s)", $ir['gang'], $r[$f], 7); $db->query($AcceptPeace); $db->query($InsertPeace); $SelectGang = sprintf("SELECT * FROM gangs WHERE (gangID = %u)", $r[$f]); $ggq = $db->query($SelectGang); $them = $db->fetch_row($ggq); $eventage = sprintf("[url='gangs.php?action=view&ID=%u']%s[/url] has accepted the peace.", $ir['gang'], $gangdata['gangNAME'], $them['gangID'], $them['gangNAME']); $event = str_replace("'", "''", $eventage); $LogEvent = sprintf("INSERT INTO gangevents VALUES ('', %u, unix_timestamp(), '%s'), ('', %u, unix_timestamp(), '%s')", $ir['gang'], $event, $r[$f], $event); $db->query($LogEvent); echo "You have accepted peace. <form action='yourgang.php' method='post'> <input type='submit' value='Go Back'></form>"; } }   then where the links for the gangs staff panel is add these links whereever you want [url='yourgang.php?action=staff&act2=peace']<center>Ask For Peace[/url] [url='yourgang.php?action=staff&act2=viewpeace']<center>View Peace Offers[/url]   then finally in all the attack files e.g. (attacklost.php, attackwon.php, attackbeat.php and attacktake.php) find... $warq=$db->query("SELECT * FROM gangwars WHERE (warDECLARER={$ir['gang']} AND warDECLARED={$r['gang']}) OR (warDECLARED={$ir['gang']} AND warDECLARER={$r['gang']})"); if ($db->num_rows($warq) > 0)   replace it on all 4 files with this $peace=$db->query("SELECT * FROM gangpeace WHERE (peaceACCEPTER={$ir['gang']} AND peaceASKER={$r['gang']}) OR (peaceASKER={$ir['gang']} AND peaceACCEPTER={$r['gang']}) AND (peaceDAYS > 0)"); $warq=$db->query("SELECT * FROM gangwars WHERE (warDECLARER={$ir['gang']} AND warDECLARED={$r['gang']}) OR (warDECLARED={$ir['gang']} AND warDECLARER={$r['gang']})"); if ($db->num_rows($warq) > 0 && $db->num_rows($peace) == 0)   then in cron_day.php put this at the bottom on top of ?> $db->query("UPDATE gangpeace SET peaceDAYS=peaceDAYS-1 WHERE peaceDAYS > 0"); $db->query("DELETE FROM gangpeace WHERE peaceDAYS <= 0");   Find any problems or bits ive missed please contact me.
  15. what about if game owners have made it so you have a 5% fee for selling your house which would be. $db->query("UPDATE users SET money=money+{$np['hPRICE']}*.95, will=0, maxwill=100 WHERE userid=$userid");   you have to do something like this wouldnt you? print "<a href='estate.php?sellhouse'> Sell Your House for [b]$/{$ir['houseprice']*.95}[/b]</a> ";   im not quite sure if im right but oh well lol.
  16. oh lol didnt know, tho it was a new thing that you have been doing lol... and i cant really code in sprintf yet, getting there tho... also i think it look better if it didnt say the "action" bit while your in hospital. but thats my own personal view lol.
  17. i think that was my old one. lol. i completely forgot about that i posted that one up... otherwise i would of just edited it... and i see what you done lol, you change the $_GET['log_id'] == abs(@intval($_GET['log_id'])); into a longer but i guess more secure way $_GET['log_id'] = ( isset($_GET['log_id']) AND ctype_digit($_GET['log_id']) ) ? $_GET['log_id'] : 0 ;
  18. ".abs(intval($r['userid']))." ".htmlentities($ir['username'])." cant remember you doing that in your mods lol. i normally do that to all my files lol. most people say there is no point in doing the ".abs(intval($r['userid']))." stuff in like link bits. _________________________________________________________________ but anyways nice remake of this mod, but also on the hospital page... why didnt you just remove the action slot when your in hospital? instead of making it say "No Actions Avaliable" or whatever lol.
  19. err... thanks i guess but what was the security issue? also what happened to the rest of it? lol.
  20. hi im wondering... can anyone create me a eye catching professional banner (non-animated or animated not fussed or even do both dont mind lol) i want the banner created for http://criminal-madness.co.uk/ if anyone can make me the advertising banner (i think its about 728x90) correct? could you tell me how much you charge please? NOTE: i dont have alot of money, i dont have any income at all. but i just want the advertising banner for when i have some money to advertise it (if i can). Thanks, Nicholas.
  21. with it action='#' wouldnt that stop it from inserting into the shoutbox? if it helps this is what i use to show the shoutbox?   <?php include_once 'globals.php'; if($ir['shoutremove'] == 0 && $ir['shoutbox'] == 0) { echo "<table width='95%' class='table' border='0' cellspacing='0'> <tr> <th colspan='3'><h3 style='text-align: left;'>Shout Box <font color=#000000>------------------------</font> [url='shoutlogs.php']? [b]Last 500 Shoutbox Messages[/b] ?[/url]</h3></th> </tr> <tr> <td colspan='3'> <iframe name='shoutbox' marginwidth='0' marginheight='0' border='0' frameborder='0' table align='center' height='185px' width='100%' src='shoutbox.php'> </iframe> </td> </tr> </table>"; } if($ir['banshout'] == 0 && $ir['shoutremove'] == 0 && $ir['shoutbox'] == 0) { echo "<form method=POST name=msg target=shoutbox action=shoutbox.php?action=post> Enter Message: <input type=text name=msg id=textbox size=50 class=inputback> <input type=submit value=ENTER class=inputback> </form> "; } ?>   then i put include_once "shout.php"; under include_once "globals.php"; in index.php
  22. hi everyone, i done this attack logs about 2-5 days ago. _____________________________________________________________   first add this to the database... ALTER TABLE `attacklogs` ADD `code` int(11) NOT NULL;   _____________________________________________________________   then find in attacktake.php $hosptime=rand(??,??);   under it put this $code = (int) (rand(1000000000,9999999999));   then find $db->query("INSERT INTO attacklogs VALUES('',$userid,{$_GET['ID']},'won',unix_timestamp(),-2,'$atklog');");   replace it with this $db->query("INSERT INTO attacklogs VALUES('',$userid,{$_GET['ID']},'won',unix_timestamp(),-2,'$atklog','$code');");   _____________________________________________________________   then find in attackbeat.php $hosptime=rand(??,??);   under it put this $code = (int) (rand(1000000000,9999999999));   then find $db->query("INSERT INTO attacklogs VALUES('',$userid,{$_GET['ID']},'won',unix_timestamp(),-1,'$atklog');");   replace it with this $db->query("INSERT INTO attacklogs VALUES('',$userid,{$_GET['ID']},'won',unix_timestamp(),-1,'$atklog','$code');");   _____________________________________________________________   then find in attackwon.php $hosptime=rand(??,??);   under it put this $code = (int) (rand(1000000000,9999999999));   then find $db->query("INSERT INTO attacklogs VALUES('',$userid,{$_GET['ID']},'won',unix_timestamp(),$stole,'$atklog');");   replace it with this $db->query("INSERT INTO attacklogs VALUES('',$userid,{$_GET['ID']},'won',unix_timestamp(),$stole,'$atklog','$code');");   _____________________________________________________________   then in attacklost.php find $hosptime=rand(??,??)+floor($ir['level']/2);   under it put $code = (int) (rand(1000000000,9999999999));   then find $db->query("INSERT INTO attacklogs VALUES('',$userid,{$_GET['ID']},'lost',unix_timestamp(),0,'$atklog');");   and replace it with $db->query("INSERT INTO attacklogs VALUES('',$userid,{$_GET['ID']},'lost',unix_timestamp(),-3,'$atklog','$code');");   _____________________________________________________________   finally here is the code, called it "attacklogs.php". <?php /* Mod Made By Nicholas [url]http://criminal-madness.co.uk/[/url] */ include "globals.php"; $_GET['page'] = (isset($_GET['page']) && is_string($_GET['page'])) ? stripslashes(trim($_GET['page'])) : FALSE; switch($_GET['page']) { case 'myattackswon': myattackswon(); break; case 'viewattackswon': viewattackswon(); break; case 'myattackslost': myattackslost(); break; case 'viewattackslost': viewattackslost(); break; case 'playerattackswon': playerattackswon(); break; case 'viewattackswon1': viewattackswon1(); break; case 'playerattackslost': playerattackslost(); break; case 'viewattackslost1': viewattackslost1(); break; default: index(); break; } function index() { global $db,$ir,$c,$h,$userid; print " <center><table width=60% cellspacing=1 class='table' border='1' bordercolor='#636363'></center> <tr style='background:black'> <th>My Attack Winning Logs</th> <th>My Attack Lost Logs</th> </tr>"; print "<tr> <td><center>[url='attacklogs.php?page=myattackswon']VIEW![/url]</td> <td><center>[url='attacklogs.php?page=myattackslost']VIEW![/url]</td> </tr>"; print "</table>"; print " <center><table width=60% cellspacing=1 class='table' border='1' bordercolor='#636363'></center> <tr style='background:black'> <th>Player Attack Winning Logs</th> <th>Player Attack Lost Logs</th> </tr>"; print "<tr> <td><center>[url='attacklogs.php?page=playerattackswon']VIEW![/url]</td> <td><center>[url='attacklogs.php?page=playerattackslost']VIEW![/url]</td> </tr>"; print "</table>"; } function myattackswon() { global $db,$ir,$c,$h,$userid; $atks=$db->query("SELECT a.*,u1.username as attackern, u2.username as attackedn, attacker, attacked, attacklog, log_id, code FROM attacklogs a LEFT JOIN users u1 ON a.attacker=u1.userid LEFT JOIN users u2 ON a.attacked=u2.userid WHERE (u1.userid=$userid) AND result='won' ORDER BY time DESC LIMIT 50"); print "<h3>Last 50 Attacks You Have Done (WON)</h3> <center><table width=75% cellspacing=1 class='table' border='1' bordercolor='#636363'></center> <tr style='background:black'> <th>Player</th> <th>Time</th> <th>Result</th> <th>View</th> </tr>"; while($r=$db->fetch_row($atks)) { $d=date('F j, Y, g:i:s a',$r['time']); print "<tr> <td><center>[url='viewuser.php?u=".abs(intval($r[']<center>".stripslashes(htmlentities($r['attackedn']))."[/url]</td> <td><center>$d</td><td><center>"; if($r['stole'] == -3) { print "Lost"; } else if ($r['stole'] == -1) { print "Hospitalized"; } else if ($r['stole'] == -2) { print "Left"; } else { print "Mugged"; } print "</td> <td><center>[url='attacklogs.php?page=viewattackswon&attacker={$r[']VIEW![/url]</td> </tr>"; } print "</table>"; } function viewattackswon() { global $db,$ir,$c,$h,$userid; $_GET['attacker'] == abs(@intval($_GET['attacker'])); if($_GET['attacker'] == '') { header('Location: attacklogs.php'); } $_GET['attacked'] == abs(@intval($_GET['attacked'])); if($_GET['attacked'] == '') { header('Location: attacklogs.php'); } $_GET['log_id'] == abs(@intval($_GET['log_id'])); if($_GET['log_id'] == '') { header('Location: attacklogs.php'); } $_GET['code'] == abs(@intval($_GET['code'])); if($_GET['code'] == '') { header('Location: attacklogs.php'); } $atks2=$db->query("SELECT a.*,u1.username as attackern, u2.username as attackedn, attacker, attacked, attacklog, log_id, code FROM attacklogs a LEFT JOIN users u1 ON a.attacker=u1.userid LEFT JOIN users u2 ON a.attacked=u2.userid WHERE log_id={$_GET['log_id']}"); print "<center><table width=90% cellspacing=1 class='table' border='1' bordercolor='#636363'>"; while($r=$db->fetch_row($atks2)) { print "<h2>[b]".stripslashes(htmlentities($r['attackern']))." VS ".stripslashes(htmlentities($r['attackedn']))."[/b]</h2> <tr> {$r['attacklog']}"; } print "</tr></table>"; } function myattackslost() { global $db,$ir,$c,$h,$userid; $atks=$db->query("SELECT a.*,u1.username as attackern, u2.username as attackedn, attacker, attacked, attacklog, log_id, code FROM attacklogs a LEFT JOIN users u1 ON a.attacker=u1.userid LEFT JOIN users u2 ON a.attacked=u2.userid WHERE (u1.userid=$userid) AND result='lost' ORDER BY time DESC LIMIT 50"); print "<h3>Last 50 Attacks You Have Done (LOST)</h3> <center><table width=75% cellspacing=1 class='table' border='1' bordercolor='#636363'></center> <tr style='background:black'> <th>Player</th> <th>Time</th> <th>View</th> </tr>"; while($r=$db->fetch_row($atks)) { $d=date('F j, Y, g:i:s a',$r['time']); print "<tr> <td><center>[url='viewuser.php?u=".abs(intval($r[']<center>".stripslashes(htmlentities($r['attackedn']))."[/url]</td> <td><center>$d</td>"; print "<td><center>[url='attacklogs.php?page=viewattackslost&attacker={$r[']VIEW![/url]</td> </tr>"; } print "</table>"; } function viewattackslost() { global $db,$ir,$c,$h,$userid; $_GET['attacker'] == abs(@intval($_GET['attacker'])); if($_GET['attacker'] == '') { header('Location: attacklogs.php'); } $_GET['attacked'] == abs(@intval($_GET['attacked'])); if($_GET['attacked'] == '') { header('Location: attacklogs.php'); } $_GET['log_id'] == abs(@intval($_GET['log_id'])); if($_GET['log_id'] == '') { header('Location: attacklogs.php'); } $_GET['code'] == abs(@intval($_GET['code'])); if($_GET['code'] == '') { header('Location: attacklogs.php'); } $atks2=$db->query("SELECT a.*,u1.username as attackern, u2.username as attackedn, attacker, attacked, attacklog, log_id, code FROM attacklogs a LEFT JOIN users u1 ON a.attacker=u1.userid LEFT JOIN users u2 ON a.attacked=u2.userid WHERE log_id={$_GET['log_id']}"); print "<center><table width=90% cellspacing=1 class='table' border='1' bordercolor='#636363'>"; while($r=$db->fetch_row($atks2)) { print "<h2>[b]".stripslashes(htmlentities($r['attackern']))." VS ".stripslashes(htmlentities($r['attackedn']))."[/b]</h2> <tr> {$r['attacklog']}"; } print "</tr></table>"; } function playerattackswon() { global $db,$ir,$c,$h,$userid; $atks=$db->query("SELECT a.*,u1.username as attackern, u2.username as attackedn, attacker, attacked, attacklog, log_id, code FROM attacklogs a LEFT JOIN users u1 ON a.attacker=u1.userid LEFT JOIN users u2 ON a.attacked=u2.userid WHERE (u2.userid=$userid) AND result='won' ORDER BY time DESC LIMIT 50"); print "<h3>Last 50 Attacks Done On You (WON)</h3> <center><table width=75% cellspacing=1 class='table' border='1' bordercolor='#636363'></center> <tr style='background:black'> <th>Player</th> <th>Time</th> <th>Result</th> <th>View</th> </tr>"; while($r=$db->fetch_row($atks)) { $d=date('F j, Y, g:i:s a',$r['time']); print "<tr> <td><center>[url='viewuser.php?u=".abs(intval($r[']<center>".stripslashes(htmlentities($r['attackern']))."[/url]</td> <td><center>$d</td><td><center>"; if($r['stole'] == -3) { print "Lost"; } else if ($r['stole'] == -1) { print "Hospitalized"; } else if ($r['stole'] == -2) { print "Left"; } else { print "Mugged"; } print "</td> <td><center>[url='attacklogs.php?page=viewattackswon1&attacker={$r[']VIEW![/url]</td> </tr>"; } print "</table>"; } function viewattackswon1() { global $db,$ir,$c,$h,$userid; $_GET['attacker'] == abs(@intval($_GET['attacker'])); if($_GET['attacker'] == '') { header('Location: attacklogs.php'); } $_GET['attacked'] == abs(@intval($_GET['attacked'])); if($_GET['attacked'] == '') { header('Location: attacklogs.php'); } $_GET['log_id'] == abs(@intval($_GET['log_id'])); if($_GET['log_id'] == '') { header('Location: attacklogs.php'); } $_GET['code'] == abs(@intval($_GET['code'])); if($_GET['code'] == '') { header('Location: attacklogs.php'); } $atks2=$db->query("SELECT a.*,u1.username as attackern, u2.username as attackedn, attacker, attacked, attacklog, log_id, code FROM attacklogs a LEFT JOIN users u1 ON a.attacker=u1.userid LEFT JOIN users u2 ON a.attacked=u2.userid WHERE log_id={$_GET['log_id']}"); print "<center><table width=90% cellspacing=1 class='table' border='1' bordercolor='#636363'>"; while($r=$db->fetch_row($atks2)) { print "<h2>[b]".stripslashes(htmlentities($r['attackern']))." VS ".stripslashes(htmlentities($r['attackedn']))."[/b]</h2> <tr> {$r['attacklog']}"; } print "</tr></table>"; } function playerattackslost() { global $db,$ir,$c,$h,$userid; $atks=$db->query("SELECT a.*,u1.username as attackern, u2.username as attackedn, attacker, attacked, attacklog, log_id, code FROM attacklogs a LEFT JOIN users u1 ON a.attacker=u1.userid LEFT JOIN users u2 ON a.attacked=u2.userid WHERE (u2.userid=$userid) AND result='lost' ORDER BY time DESC LIMIT 50"); print "<h3>Last 50 Attacks Done On You (LOST)</h3> <center><table width=75% cellspacing=1 class='table' border='1' bordercolor='#636363'></center> <tr style='background:black'> <th>Player</th> <th>Time</th> <th>View</th> </tr>"; while($r=$db->fetch_row($atks)) { $d=date('F j, Y, g:i:s a',$r['time']); print "<tr> <td><center>[url='viewuser.php?u=".abs(intval($r[']<center>".stripslashes(htmlentities($r['attackern']))."[/url]</td> <td><center>$d</td>"; print "<td><center>[url='attacklogs.php?page=viewattackslost1&attacker={$r[']VIEW![/url]</td> </tr>"; } print "</table>"; } function viewattackslost1() { global $db,$ir,$c,$h,$userid; $_GET['attacker'] == abs(@intval($_GET['attacker'])); if($_GET['attacker'] == '') { header('Location: attacklogs.php'); } $_GET['attacked'] == abs(@intval($_GET['attacked'])); if($_GET['attacked'] == '') { header('Location: attacklogs.php'); } $_GET['log_id'] == abs(@intval($_GET['log_id'])); if($_GET['log_id'] == '') { header('Location: attacklogs.php'); } $_GET['code'] == abs(@intval($_GET['code'])); if($_GET['code'] == '') { header('Location: attacklogs.php'); } $atks2=$db->query("SELECT a.*,u1.username as attackern, u2.username as attackedn, attacker, attacked, attacklog, log_id, code FROM attacklogs a LEFT JOIN users u1 ON a.attacker=u1.userid LEFT JOIN users u2 ON a.attacked=u2.userid WHERE log_id={$_GET['log_id']}"); print "<center><table width=90% cellspacing=1 class='table' border='1' bordercolor='#636363'>"; while($r=$db->fetch_row($atks2)) { print "<h2>[b]".stripslashes(htmlentities($r['attackern']))." VS ".stripslashes(htmlentities($r['attackedn']))."[/b]</h2> <tr> {$r['attacklog']}"; } print "</tr></table>"; } ?>
  23. nope :( thanks for trying tho :) i dont think criminal madness likes javascript lol. ive researched on google and used all typed of onclick methods. didnt work... lol.
  24. hi im wondering can anyone help me on this? i cant figure out what to do...   <form method='POST' name='msg' target='shoutbox' action='shoutbox.php?action=post'> Enter Message: <input type='text' name='msg' id='textbox' size='50'> <input type='submit' value='ENTER'> </form>   can anyone figure out how to make it so when you click ENTER (button or keyboard) the text in the box will disappear, i cant figure out what "onclick=??????" function i need. can someone help? it be very greatful.
  25. do you mean on my coding for the right hand side bit? if so yer, wondering when someone catch me out... techically just copied and pasted on most of it but some information changed... but its still quite good looking help tutorial page. lol.
×
×
  • Create New...