Jump to content
MakeWebGames

Jailbust How Do I..


HITMAN 17
 Share

Recommended Posts

How Do I Make It Take Energy As All It Says Is That I Need Full Energy Please Can Someone Tell Me Code Cheers

<?php
include "globals.php";
if($ir['energy'] < 10)
{
 die("Sorry, it costs 10 energy to bust someone. You only have {$ir['energy']} energy. Come back later.");
}
if($ir['jail'])
{
 die("You cannot bust out people while in jail.");
}
$_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['jail'])
{
 die("That user is not in jail!");
}
$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 busted {$r['username']} out of jail.

 > [url='jail.php']Back[/url]";
 $db->query("UPDATE users SET crimexp=crimexp+{$gain} WHERE userid=$userid");
 $db->query("UPDATE users SET jail=0 WHERE userid={$r['userid']}");
 $db->query("UPDATE users SET busts=busts+1");
 event_add($r['userid'], "[url='viewuser.php?u={$ir[']{$ir['username']}[/url] busted you out of jail.", $c);
}
else
{
 print "While trying to bust out your friend, a guard spotted you and dragged you into jail yourself. Unlucky!

 > [url='jail.php']Back[/url]";
 $time=min($mult, 20);
 $db->query("UPDATE users SET jail=$time, jail_reason='Caught trying to bust out {$r['username']}' WHERE userid=$userid");
 event_add($r['userid'], "[url='viewuser.php?u={$ir[']{$ir['username']}[/url] was caught trying to bust you out of jail.", $c);
}
$h->endpage();
?>
Link to comment
Share on other sites

Re: Jailbust How Do I..

I dont call what i do spamming.. I call it "Calling Out", bS people who just wants someeone to do something for them rather then them learning.

Now what I call spamming is a guy that has OVER 1000 POST and still cant do ANYTHING himself.

I don't mind helping people. NOTICE THE WORD HELP

I DONT like doing stuff for poeple and the way you go about stuff is stupid. You try to get people to DO stuff for you and when they give you a link that showed and explained it to them, you just say you dont understand. I bet you dont open the page to look at it, and if you do. and dont understand You dont need a game, cause you will never have any knowledge of PHP.

Link to comment
Share on other sites

Re: Jailbust How Do I..

 

im going to stop replying to these silly topics and like other people say i like learning off other people instead off reading

Finally logic.........He admits he is an idiot...

 

well wasn't that post stupid? just gunna cause an argument now....

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...