Eruondo Posted April 21, 2009 Posted April 21, 2009 This is my first mod, so go easy on me. Save this as jailescape.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. and add this to your jail.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. And that should be it. Quote
AlabamaHit Posted April 21, 2009 Posted April 21, 2009 Re: My jailescape I think you can do away with $r=$db->fetch_row($db->query("SELECT * FROM users WHERE userid={$_GET['ID']}")); This will help the server load. Quote
mentaljason Posted April 21, 2009 Posted April 21, 2009 Re: My jailescape looks good, im going to give you your first +1 :-D Quote
Eruondo Posted April 21, 2009 Author Posted April 21, 2009 Re: My jailescape Thanks, I'm glad it's working, :-D Quote
Strats Posted April 22, 2009 Posted April 22, 2009 Re: My jailescape I gave your your first proper +1 :P Quote
DELETE ME NOW! Posted April 22, 2009 Posted April 22, 2009 Re: My jailescape Even better.. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Change to. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. 3 mySQL Querys into one :) Quote
Eruondo Posted April 22, 2009 Author Posted April 22, 2009 Re: My jailescape Thanks, I would add it in, but I'm not allowed, :roll: Quote
DELETE ME NOW! Posted April 22, 2009 Posted April 22, 2009 Re: My jailescape You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Like i said dont forget i havent tested this... Same script just made it cleaner lol Quote
ReaSonZ Posted April 22, 2009 Posted April 22, 2009 Re: My jailescape $db->query("UPDATE users SET brave=brave-7 WHERE userid=$userid"); i only see that part with brave will that mean you will go negitive ? Quote
DELETE ME NOW! Posted April 23, 2009 Posted April 23, 2009 Re: My jailescape $db->query("UPDATE users SET brave=brave-7 WHERE userid=$userid"); i only see that part with brave will that mean you will go negitive ? Do something to check if they have the right amount of brave........ Quote
Dayo Posted April 23, 2009 Posted April 23, 2009 Re: My jailescape add somat like You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. plus crazy y did you put code tags around your bb code? Quote
Eruondo Posted April 26, 2009 Author Posted April 26, 2009 Re: My jailescape Just notised a little bug. replace else { print "<font color='#FFFFFF'>While trying to escape from jail, a guard spots you. Looks like you are going to be here even longer than we thought! "; $time=rand(30,100); $db->query("UPDATE users SET jail=jail+$time WHERE userid=$userid", $c); } with else { print "<font color='#FFFFFF'>While trying to escape from jail, a guard spots you. Looks like you are going to be here even longer than we thought! "; $time=rand(30,100); $db->query("UPDATE users SET brave=brave-7 jail=jail+$time WHERE userid=$userid", $c); } and everything should be fine. Quote
Eruondo Posted April 26, 2009 Author Posted April 26, 2009 Re: My jailescape Just notised a little bug. replace else { print "<font color='#FFFFFF'>While trying to escape from jail, a guard spots you. Looks like you are going to be here even longer than we thought! "; $time=rand(30,100); $db->query("UPDATE users SET jail=jail+$time WHERE userid=$userid", $c); } with else { print "<font color='#FFFFFF'>While trying to escape from jail, a guard spots you. Looks like you are going to be here even longer than we thought! "; $time=rand(30,100); $db->query("UPDATE users SET brave=brave-7 jail=jail+$time WHERE userid=$userid", $c); } and everything should be fine. Whops, try You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Sorry, :P Quote
Karlos Posted April 26, 2009 Posted April 26, 2009 Re: My jailescape You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Completely Untested.. 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.