HITMAN 17 Posted October 28, 2008 Posted October 28, 2008 i have not yet seen a working version of this and whenever i try i fail please can someone make this for v1 and i will test it out for them thank you Quote
shaved92bravada Posted October 28, 2008 Posted October 28, 2008 Re: [v1]Request For Failing Crime Results to jail If you use this one that I edited for you yesterday then it will send you to jail when you fail.......... sometimes........ its random, sometimes you just fail, sometimes you get thrown in jail. But if I remember correctly on my V1 it didn't come with jail.php so I had to make my own, and it also doesn't come with jail_reason in the user database which you will have to add that in there yourself. Other than that I tested it on my test site and it worked like a charm everytime. the sql is ALTER TABLE `crimes` ADD `crimeJTEXT` TEXT NOT NULL AFTER `crimeFTEXT` , ADD `crimeJAILTIME` INT NOT NULL DEFAULT '0' AFTER `crimeJTEXT` , ADD `crimeJREASON` VARCHAR( 255 ) NOT NULL AFTER `crimeJAILTIME` ; ALTER TABLE `users` ADD `jail_reason` VARCHAR( 255 ) NOT NULL AFTER `hospreason` ; <?php /*----------------------------------------------------- -- Mono Country v1.0 BETA -- A product of DBS-entertainment -- Copyright held 2005 by Dabomstew -- docrime.php edited by Shaved92Bravada -----------------------------------------------------*/ session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); $_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","EXP","WILL","IQ"), array($ir['level'], $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['exp']+=(int) ($r['crimeSUCCESSMUNY']/8); mysql_query("UPDATE users SET money={$ir['money']},exp={$ir['exp']} WHERE userid=$userid",$c); } else { if(rand(1, 2) == 1) { print $r['crimeFTEXT']; } else { print $r['crimeJTEXT']; mysql_query("UPDATE `users` SET `jail` = '$r[crimeJAILTIME]', `jail_reason` = '$r[crimeJREASON]' WHERE `userid` = '$userid'",$c); } } print " [url='docrime.php?c={$_GET[']Try Again[/url] [url='criminal.php']Crimes[/url]"; } } $h->endpage(); ?> Quote
HITMAN 17 Posted October 29, 2008 Author Posted October 29, 2008 Re: [v1]Request For Failing Crime Results to jail i have tryed this and it dosnt put me in jail can anyone fix it please Quote
AlabamaHit Posted October 30, 2008 Posted October 30, 2008 Re: [v1]Request For Failing Crime Results to jail Just an idea....dont know if it will work but in the query.. print $r['crimeJTEXT']; mysql_query("UPDATE `users` SET `jail` = '$r[crimeJAILTIME]', `jail_reason` = '$r[crimeJREASON]' WHERE `userid` = '$userid'",$c); i dont think that the Time needs to be '' so try nor the userid.... print $r['crimeJTEXT']; mysql_query("UPDATE `users` SET `jail` = {$r[crimeJAILTIME]}, `jail_reason` = '$r[crimeJREASON]' WHERE `userid` = $userid",$c); Quote
HITMAN 17 Posted October 30, 2008 Author Posted October 30, 2008 Re: [v1]Request For Failing Crime Results to jail dosnt make any difference Quote
AlabamaHit Posted October 30, 2008 Posted October 30, 2008 Re: [v1]Request For Failing Crime Results to jail If you use this one that I edited for you yesterday then it will send you to jail when you fail.......... sometimes........ its random, sometimes you just fail, sometimes you get thrown in jail. But if I remember correctly on my V1 it didn't come with jail.php so I had to make my own, and it also doesn't come with jail_reason in the user database which you will have to add that in there yourself. Other than that I tested it on my test site and it worked like a charm everytime. the sql is ALTER TABLE `crimes` ADD `crimeJTEXT` TEXT NOT NULL AFTER `crimeFTEXT` , ADD `crimeJAILTIME` INT NOT NULL DEFAULT '0' AFTER `crimeJTEXT` , ADD `crimeJREASON` VARCHAR( 255 ) NOT NULL AFTER `crimeJAILTIME` ; ALTER TABLE `users` ADD `jail_reason` VARCHAR( 255 ) NOT NULL AFTER `hospreason` ; <?php /*----------------------------------------------------- -- Mono Country v1.0 BETA -- A product of DBS-entertainment -- Copyright held 2005 by Dabomstew -- docrime.php edited by Shaved92Bravada -----------------------------------------------------*/ session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); $_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","EXP","WILL","IQ"), array($ir['level'], $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['exp']+=(int) ($r['crimeSUCCESSMUNY']/8); mysql_query("UPDATE users SET money={$ir['money']},exp={$ir['exp']} WHERE userid=$userid",$c); } else { if(rand(1, 2) == 1) { print $r['crimeFTEXT']; } else { print $r['crimeJTEXT']; mysql_query("UPDATE `users` SET `jail` = '$r[crimeJAILTIME]', `jail_reason` = '$r[crimeJREASON]' WHERE `userid` = '$userid'",$c); } } print " [url='docrime.php?c={$_GET[']Try Again[/url] [url='criminal.php']Crimes[/url]"; } } $h->endpage(); ?> maybe he just miss this then... SQL ALTER TABLE `users` ADD `jail` INT(2) NOT NULL AFTER `jail_reason` ; and put the page back the way he orginally had it not the way i said...cuase he might have just forgot a table alter and the page be fine Quote
HITMAN 17 Posted October 30, 2008 Author Posted October 30, 2008 Re: [v1]Request For Failing Crime Results to jail still know it just not adding me in jail Quote
AlabamaHit Posted October 30, 2008 Posted October 30, 2008 Re: [v1]Request For Failing Crime Results to jail so you did add the jail to the users table? if so sorry man...im not sure.. Quote
HITMAN 17 Posted October 30, 2008 Author Posted October 30, 2008 Re: [v1]Request For Failing Crime Results to jail yer i did lol i aint that dum Quote
AlabamaHit Posted October 30, 2008 Posted October 30, 2008 Re: [v1]Request For Failing Crime Results to jail didn't mean that....Its just usually the small things that are the errors... 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.