canibalstew Posted February 2, 2007 Share Posted February 2, 2007 make a file jailbribe.php <? session_start(); require "globals.php"; if($ir['jail']==0) { die("You arent in jail!"); } //set $cost to what you want it to cost $cost=rand(10000,100000); $bravec=5; //set $stat to the stat you want it to use..eg. brave, energy, will etc $braves='brave'; If ($ir[$money]<$cost or $ir[$brave]<$bravec) { die ("Your Dont have enough money to bribe the guard or enough brave to do it."); } if(rand(1,100) <= 20) { print "You successfully Bribed your way out of the Battle Creek City Jail."; mysql_query("update users set money=money-$cost, $braves=$braves-$bravec where userid=$userid",$c)or die(mysql_error()); mysql_query("UPDATE users SET jail=0 WHERE userid=$userid",$c); } else { $jailtime=(int) rand(1,30); print "You were caught attempting to bribe your way out of the Battle Creek City Jail. The officers beat you for a while and added $jailtime minutes to your sentence."; mysql_query("UPDATE users SET jail=jail+$jailtime WHERE userid=$userid", $c); mysql_query("UPDATE users SET jailreason='Caught attempting to escape' WHERE userid=$userid", $c); } ?> now if you got ver 1.1 you replace the include"globals.php"; with 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(); last thing is to put a link in your jail your done if thers anything wrong with it im sure you all will say Quote Link to comment Share on other sites More sharing options...
ronhouston2 Posted February 28, 2008 Share Posted February 28, 2008 Re: Free Jail feature Bribe The guard It keeps saying you dont have enogh Brave or Money to do this when i have plenty need to fix this up a bit but a really good mod +1 :D :D :D :D Quote Link to comment Share on other sites More sharing options...
iseeyou94056 Posted February 28, 2008 Share Posted February 28, 2008 Re: Free Jail feature Bribe The guard thats real nice you had me pay fr this Quote Link to comment Share on other sites More sharing options...
reload Posted February 28, 2008 Share Posted February 28, 2008 Re: Free Jail feature Bribe The guard Heres a fixed version and much better than the current one. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. ~reload Quote Link to comment Share on other sites More sharing options...
Isomerizer Posted February 28, 2008 Share Posted February 28, 2008 Re: Free Jail feature Bribe The guard You just removed If You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. and the $ from You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. It should be: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. OR = || in php operators. Quote Link to comment Share on other sites More sharing options...
weewooz Posted February 28, 2008 Share Posted February 28, 2008 Re: Free Jail feature Bribe The guard im using vr1 and it keeps saying you aint in jail when i am lol any ideas guys thanks alot Quote Link to comment Share on other sites More sharing options...
weewooz Posted February 28, 2008 Share Posted February 28, 2008 Re: Free Jail feature Bribe The guard if($ir['jail']==0) is it some thing to do that wot needs changing Quote Link to comment Share on other sites More sharing options...
weewooz Posted February 28, 2008 Share Posted February 28, 2008 Re: Free Jail feature Bribe The guard vr shud be if($ir['jail'] > 0) Quote Link to comment Share on other sites More sharing options...
Klikoka Posted February 28, 2008 Share Posted February 28, 2008 Re: Free Jail feature Bribe The guard if($ir['jail']==0) is it some thing to do that wot needs changing Try You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
weewooz Posted February 28, 2008 Share Posted February 28, 2008 Re: Free Jail feature Bribe The guard either i cant code lol or this code dont work full stop sorry man nice code and that but probs all over when you are in jail it says ya not and if its the first time you use it it works but after that keeps saying your not in jail when you are i play with when i work it out ill post thanks Quote Link to comment Share on other sites More sharing options...
ronhouston2 Posted February 29, 2008 Share Posted February 29, 2008 Re: Free Jail feature Bribe The guard it works great on my game loveing it thanks Quote Link to comment Share on other sites More sharing options...
spazz Posted February 29, 2008 Share Posted February 29, 2008 Re: Free Jail feature Bribe The guard Great Mod....my players love it. Thank You Quote Link to comment Share on other sites More sharing options...
reload Posted February 29, 2008 Share Posted February 29, 2008 Re: Free Jail feature Bribe The guard You just removed If You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. and the $ from You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. It should be: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. OR = || in php operators. No i didnt just remove that, I also added if you get caught trying to bribe him you still lose your cash Quote Link to comment Share on other sites More sharing options...
weewooz Posted February 29, 2008 Share Posted February 29, 2008 Re: Free Jail feature Bribe The guard so as any one got a few version working vr 1 code because i cant get it to work saying im not in jail when i am thanks alot Quote Link to comment Share on other sites More sharing options...
mikrows Posted March 7, 2008 Share Posted March 7, 2008 Re: Free Jail feature Bribe The guard Just basically added a line so if you fail the bribe you still lose the bribe money. Hope that was ok. <? session_start(); require "globals.php"; if($ir['jail']==0) { die("You arent in jail!"); } //set $cost to what you want it to cost $cost=rand(10000,50000); //set $stat to the stat you want it to use..eg. brave, energy, will etc If ($ir['money']<$cost ) { die ("Your Dont have enough money to bribe the guard or enough brave to do it."); } if(rand(1,100) <= 20) { print "You successfully paid $$cost to Bribed your way out of the Torn County Jail."; mysql_query("update users set money=money-$cost where userid=$userid",$c)or die(mysql_error()); mysql_query("UPDATE users SET jail=0 WHERE userid=$userid",$c); } else { $jailtime=(int) rand(1,30); print "You were caught attempting to bribe your way out of the Torn County Jail. The officers beat you for a while, take the $$cost anyway and added $jailtime minutes to your sentence."; mysql_query("update users set money=money-$cost where userid=$userid",$c); mysql_query("UPDATE users SET jail=jail+$jailtime, money=money-$cost WHERE userid=$userid", $c); mysql_query("UPDATE users SET jailreason='Caught attempting to escape' WHERE userid=$userid", $c); } ?> Quote Link to comment Share on other sites More sharing options...
reload Posted March 8, 2008 Share Posted March 8, 2008 Re: Free Jail feature Bribe The guard Just basically added a line so if you fail the bribe you still lose the bribe money. Hope that was ok. <? session_start(); require "globals.php"; if($ir['jail']==0) { die("You arent in jail!"); } //set $cost to what you want it to cost $cost=rand(10000,50000); //set $stat to the stat you want it to use..eg. brave, energy, will etc If ($ir['money']<$cost ) { die ("Your Dont have enough money to bribe the guard or enough brave to do it."); } if(rand(1,100) <= 20) { print "You successfully paid $$cost to Bribed your way out of the Torn County Jail."; mysql_query("update users set money=money-$cost where userid=$userid",$c)or die(mysql_error()); mysql_query("UPDATE users SET jail=0 WHERE userid=$userid",$c); } else { $jailtime=(int) rand(1,30); print "You were caught attempting to bribe your way out of the Torn County Jail. The officers beat you for a while, take the $$cost anyway and added $jailtime minutes to your sentence."; mysql_query("update users set money=money-$cost where userid=$userid",$c); mysql_query("UPDATE users SET jail=jail+$jailtime, money=money-$cost WHERE userid=$userid", $c); mysql_query("UPDATE users SET jailreason='Caught attempting to escape' WHERE userid=$userid", $c); } ?> That was allready done with the coded i added above about 5 posts ago Quote Link to comment Share on other sites More sharing options...
mikrows Posted March 8, 2008 Share Posted March 8, 2008 Re: Free Jail feature Bribe The guard Just basically added a line so if you fail the bribe you still lose the bribe money. Hope that was ok. <? session_start(); require "globals.php"; if($ir['jail']==0) { die("You arent in jail!"); } //set $cost to what you want it to cost $cost=rand(10000,50000); //set $stat to the stat you want it to use..eg. brave, energy, will etc If ($ir['money']<$cost ) { die ("Your Dont have enough money to bribe the guard or enough brave to do it."); } if(rand(1,100) <= 20) { print "You successfully paid $$cost to Bribed your way out of the Torn County Jail."; mysql_query("update users set money=money-$cost where userid=$userid",$c)or die(mysql_error()); mysql_query("UPDATE users SET jail=0 WHERE userid=$userid",$c); } else { $jailtime=(int) rand(1,30); print "You were caught attempting to bribe your way out of the Torn County Jail. The officers beat you for a while, take the $$cost anyway and added $jailtime minutes to your sentence."; mysql_query("update users set money=money-$cost where userid=$userid",$c); mysql_query("UPDATE users SET jail=jail+$jailtime, money=money-$cost WHERE userid=$userid", $c); mysql_query("UPDATE users SET jailreason='Caught attempting to escape' WHERE userid=$userid", $c); } ?> That was allready done with the coded i added above about 5 posts ago I used reloads post but it certainly did not take money off the victim if he failed the bribed, as I said ive added a line so that if you get caught bribing, you still lose the money, Ive highlited the lines ive added which you can see are not in reloads orriginal, Thank you. Quote Link to comment Share on other sites More sharing options...
reload Posted March 8, 2008 Share Posted March 8, 2008 Re: Free Jail feature Bribe The guard Heres a fixed version and much better than the current one. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. ~reload You didnt add anything I allready had that if you get caught trying to bribe him you get jailed and your money gets taken away to. It is Made bold and underlined so you can see it now, Just incase you "couldnt" before. mysql_query("UPDATE users SET jail=jail+$jailtime, money=money-$cost WHERE userid=$userid", $c); Quote Link to comment Share on other sites More sharing options...
reload Posted March 8, 2008 Share Posted March 8, 2008 Re: Free Jail feature Bribe The guard Just basically added a line so if you fail the bribe you still lose the bribe money. Hope that was ok. <? session_start(); require "globals.php"; if($ir['jail']==0) { die("You arent in jail!"); } //set $cost to what you want it to cost $cost=rand(10000,50000); //set $stat to the stat you want it to use..eg. brave, energy, will etc If ($ir['money']<$cost ) { die ("Your Dont have enough money to bribe the guard or enough brave to do it."); } if(rand(1,100) <= 20) { print "You successfully paid $$cost to Bribed your way out of the Torn County Jail."; mysql_query("update users set money=money-$cost where userid=$userid",$c)or die(mysql_error()); mysql_query("UPDATE users SET jail=0 WHERE userid=$userid",$c); } else { $jailtime=(int) rand(1,30); print "You were caught attempting to bribe your way out of the Torn County Jail. The officers beat you for a while, take the $$cost anyway and added $jailtime minutes to your sentence."; mysql_query("update users set money=money-$cost where userid=$userid",$c); mysql_query("UPDATE users SET jail=jail+$jailtime, money=money-$cost WHERE userid=$userid", $c); mysql_query("UPDATE users SET jailreason='Caught attempting to escape' WHERE userid=$userid", $c); } ?> That was allready done with the coded i added above about 5 posts ago I used reloads post but it certainly did not take money off the victim if he failed the bribed, as I said ive added a line so that if you get caught bribing, you still lose the money, Ive highlited the lines ive added which you can see are not in reloads orriginal, Thank you. As you see with my code that you try to claim thats yours it was allready taking money away. mysql_query("update users set money=money-$cost where userid=$userid",$c); mysql_query("UPDATE users SET jail=jail+$jailtime, money=money-$cost WHERE userid=$userid", $c); As you see here and if you have a look at the code he submited a good 5 posts after mine whats standing out here?? Is it that he forgot to take away the mysql_query("UPDATE users SET jail=jail+$jailtime, money=money-$cost WHERE userid=$userid", $c); which allready have my -$cost in it? So Now do you think you added it? pfft. Quote Link to comment Share on other sites More sharing options...
mikrows Posted March 9, 2008 Share Posted March 9, 2008 Re: Free Jail feature Bribe The guard Reload, I do Appologise I didnt see that and now you explained it clearly and pointed out where it is and also now im fully awake,(It was 4.30am where i was), well thank you for doing it anyway, the members like it, but i did add the text telling the members that they lost the money anyway "take the $$cost anyway", hope you dont mind that.... quite funny, no ones noticed that they are loosing double the money, id better go and take my line out now. Once again Thanks Quote Link to comment Share on other sites More sharing options...
reload Posted March 9, 2008 Share Posted March 9, 2008 Re: Free Jail feature Bribe The guard Reload, I do Appologise I didnt see that and now you explained it clearly and pointed out where it is and also now im fully awake,(It was 4.30am where i was), well thank you for doing it anyway, the members like it, but i did add the text telling the members that they lost the money anyway "take the $$cost anyway", hope you dont mind that.... quite funny, no ones noticed that they are loosing double the money, id better go and take my line out now. Once again Thanks lol no problems mate :P Quote Link to comment Share on other sites More sharing options...
ddupuis Posted January 11, 2009 Share Posted January 11, 2009 Re: Free Jail feature Bribe The guard either way you look at it this mod has been used in other games before this post.. Quote Link to comment Share on other sites More sharing options...
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.