oxidati0n Posted May 31, 2007 Posted May 31, 2007 This is a advanced criminal record. Works like a charm and is very useful. :) 1) Execute Query You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. 2) Create file "criminalrecord.php" You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. 3) replace docrime.php with this You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. 4) open criminal.php and find where it says You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. add below You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. There you go, your done! :) Works 100% Guaranteed! Quote
Decepti0n Posted May 31, 2007 Posted May 31, 2007 Re: [mccode] FREE Criminal Record (advanced) Man that's inefficient :| Im not surprised so many people get kicked off their servers Quote
oxidati0n Posted May 31, 2007 Author Posted May 31, 2007 Re: [mccode] FREE Criminal Record (advanced) Man that's inefficient :| Im not surprised so many people get kicked off their servers What do you call efficent then :| A script's a script. Quote
-Matt- Posted July 31, 2007 Posted July 31, 2007 Re: [mccode] FREE Criminal Record (advanced) can any 1 convert to v2 plz Quote
Jawad Posted July 31, 2007 Posted July 31, 2007 Re: [mccode] FREE Criminal Record (advanced) nice on oxi :-D Quote
John99 Posted July 31, 2007 Posted July 31, 2007 Re: [mccode] FREE Criminal Record (advanced) Man that's inefficient :| Im not surprised so many people get kicked off their servers yeah plus its taking more and more space on your server for everyuser i agree with Decepti0n Quote
UCC Posted July 31, 2007 Posted July 31, 2007 Re: [mccode] FREE Criminal Record (advanced) Man that's inefficient :| Im not surprised so many people get kicked off their servers What do you call efficent then :| A script's a script. The things I would do differently include..... (based of a very quick review) Not having an Insert for every single crime outcome. Instead, have one row per user. Do not insert unless there is no pre-existing entry. Otherwise, simply increment a counter for success or fail. That will significantly reduce the query needs when you go to report the ratios. I guess you're not even tracking failures but you could easily track both and still end up with more efficient queries In addition, doing a select * from a table when you do not need every field is wasted processing as well. Quote
YoungGold Posted July 31, 2007 Posted July 31, 2007 Re: [mccode] FREE Criminal Record (advanced) ive never seen mods like this before is this like a advanced crimes page Quote
-Matt- Posted July 31, 2007 Posted July 31, 2007 Re: [mccode] FREE Criminal Record (advanced) youggold it shows wat crimes u have done advanced not advanced crimes Quote
John99 Posted July 31, 2007 Posted July 31, 2007 Re: [mccode] FREE Criminal Record (advanced) ive never seen mods like this before is this like a advanced crimes page LMFAO Quote
oxidati0n Posted August 1, 2007 Author Posted August 1, 2007 Re: [mccode] FREE Criminal Record (advanced) Well it's basic => free, If I made it very efficient I would sell it.. duh! :mrgreen: Quote
3XTR3M3 Posted August 6, 2007 Posted August 6, 2007 Re: [mccode] FREE Criminal Record (advanced) OXi would i put that crim record beneath print "Criminal Centre Quote
John99 Posted August 6, 2007 Posted August 6, 2007 Re: [mccode] FREE Criminal Record (advanced) OXi would i put that crim record beneath print "Criminal Centre lol he just done the job so here you go if you want to edit it then edit it! Quote
iseeyou94056 Posted August 28, 2007 Posted August 28, 2007 Re: [mccode] FREE Criminal Record (advanced) it dont realy work right but i like it i dont got it on my game no more but is there a way that someone could fix it Quote
Ishy Posted August 30, 2007 Posted August 30, 2007 Re: [mccode] FREE Criminal Record (advanced) Well OXI There is a bug on there, on docrime.php you created for this... The user does not get NO EXP at all when they do a crime, I don't know if you want it to be like that but I think people would like it like that :-D Just a thought :mrgreen: Quote
renoirz Posted October 28, 2007 Posted October 28, 2007 Re: [mccode] FREE Criminal Record (advanced) here i fixed the prob.. the exp should load for u now <?php $macropage="docrime.php?c={$_GET['c']}"; include "globals.php"; if($ir['jail'] or $ir['hospital']) { die("This page cannot be accessed while in jail or hospital."); } $_GET['c']=abs((int) $_GET['c']); if(!$_GET['c']) { print "Invalid crime"; } else { $q=mysql_query("SELECT * FROM crimes WHERE crimeID={$_GET['c']}",$c); $r=mysql_fetch_array($q); if($ir['brave'] < $r['crimeBRAVE']) { print "You do not have enough Brave to perform this crime."; } 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 $r['crimeITEXT']; $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']); $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 $r['crimeFTEXT']; } else { print $r['crimeJTEXT']; $db->query("UPDATE `users` SET `jail` = '$r[crimeJAILTIME]', `jail_reason` = '$r[crimeJREASON]' WHERE `userid` = '$userid'"); } } print " Try Again Crimes"; }print "Criminal Record "; mysql_query("INSERT INTO `criminalrecord` (`crime`, `user`, `succeeded`) VALUES ('$_GET[c]', '$userid', '$succ');",$c); } $h->endpage(); ?> Quote
ignite Posted January 29, 2008 Posted January 29, 2008 Re: [mccode] FREE Criminal Record (advanced) Theres a few bugs with this, i've fixed the exp one. It always inserts 0 for your success even if you have failed or succeeded. $succ="0" Don't really know what you would change that to. If a crime has already been done by someone else it won't insert again. Quote
Richard Posted July 29, 2008 Posted July 29, 2008 Re: Criminal Record [V2] Ive tried this criminal record, but it didn't work for me. So ive slightly changed it and got it to work. SQL: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Replace docrime.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Add criminalrecord.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
BluntMan Posted February 7, 2009 Posted February 7, 2009 Re: [mccode] FREE Criminal Record (advanced) great mod +1 Quote
-BRAIDZ- Posted May 6, 2015 Posted May 6, 2015 Does anyone have a working version of this for V2? Quote
Zettieee Posted May 6, 2015 Posted May 6, 2015 Replace: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. With You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. then replace: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. with You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. then replace You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. with You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. then replace You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. with You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.