ronhouston2 Posted March 30, 2008 Posted March 30, 2008 <?php include "globals.php"; if($ir['energy'] < 10) { die("Sorry, it costs 10 energy to help someone escape from hospital. You only have {$ir['energy']} energy. Come back later."); } if($ir['jail']) { die("You cannot help escape people from hospital while in jail."); } if($ir['hospital']) { die("You cannot help escape people from hospital while in hospital."); } $_GET['ID']=abs((int) $_GET['ID']); $r=$db->fetch_row($db->query("SELECT * FROM users WHERE userid={$_GET['ID']}")); if(!$r['userid']) { die("Invalid user"); } if(!$r['hospital']) { die("That user is not in hospital!"); } $mult=$r['level']*$r['level']; $chance=min(($ir['crimexp']/$mult)*50+1, 95); if(rand(1,100) < $chance) { $gain=$r['level']*5; print "You successfully helped {$r['username']}escape out of hospital. > Back"; $db->query("UPDATE users SET crimexp=crimexp+{$gain} WHERE userid=$userid"); $db->query("UPDATE users SET jail=0 WHERE userid={$r['userid']}"); event_add($r['userid'], "{$ir['username']} busted you out of jail.", $c); } else { print "While trying to help escape your friend from hospital, a Cop spotted you and dragged you into jail yourself. Unlucky! > Go to Jail"; $time=min($mult, 100); $db->query("UPDATE users SET jail=$time, jail_reason='Caught trying to help escape from hospital {$r['username']}' WHERE userid=$userid"); event_add($r['userid'], "{$ir['username']} was caught trying to bust you out of jail.", $c); } $h->endpage(); ?> heres anouther new mod i made Escape From Hospital you can help spmeone escape from the hospital if you get caught you will be sent to JAIL [Hospital Escape] add this into the Hospital for the link to help spmeone escape from the Hospital Quote
ronhouston2 Posted March 30, 2008 Author Posted March 30, 2008 Re: Hospital Escape for V2 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. I updated it the events was not saying the right thing let me know if you have any problems thanks........... Quote
Klikoka Posted April 1, 2008 Posted April 1, 2008 Re: Hospital Escape for V2 What is the point in this its just an easy way for people to get out its not nessesery Quote
Halo Posted April 1, 2008 Posted April 1, 2008 Re: Hospital Escape for V2 A good code, but i wont use it in my game Quote
ronhouston2 Posted April 1, 2008 Author Posted April 1, 2008 Re: Hospital Escape for V2 this mod dose help with Crime Exp as well :D :D 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.