Jump to content
MakeWebGames

Recommended Posts

Posted

when i do a crime you both suceed and fail at the same time.

1. You see a bum under the bridge.

2. You grab him by the hair and drag him back to your apartment.

Result: The police give you the cash so they don't have to clean up the mess of another dead body.

Result: The bum beats the hell out of you and takes your ass to jail.

Try Again

Crimes

How do i get it to where that doesnt happen?

Posted

Re: crimes

 

<?php
/*-----------------------------------------------------
-- Mono Country v1.0 BETA
-- A product of DBS-entertainment
-- Copyright held 2005 by Dabomstew
-- INDEX.php
-----------------------------------------------------*/
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();
if($ir['jail'])
{
print"You cannot do crimes while youre in jail.";
$h->endpage();
exit;
}
if($ir['hospital'])
{
print"You cannot do crimes while youre in the hospital.";
$h->endpage();
exit;
}$q=mysql_query("SELECT * FROM crimegroups ORDER by cgORDER ASC",$c);
print "[b]Do Crimes[/b]

<table width='75%'><tr><th>Crime</th><th>Cost</th><th>Payout</th><th>Do</th></tr>";
while($r=mysql_fetch_array($q))
{
print "<tr style='background-color:gray'><td colspan='4'>{$r['cgNAME']}</td></tr>";
$q2=mysql_query("SELECT * FROM crimes WHERE crimeGROUP={$r['cgID']}",$c);
while ($r2=mysql_fetch_array($q2))
{
print "<tr><td>{$r2['crimeNAME']}</td><td><center>{$r2['crimeBRAVE']} Brave</td><td><center>\${$r2['crimeSUCCESSMUNY']}</center></td><td><center>[url='docrime.php?c={$r2[']Do[/url]</center></td></tr>";
}
}
?>
Posted

Re: crimes

 

<?php
/*
MCCodes Lite
docrime.php Rev 1.0.0
Copyright (C) 2006 Dabomstew

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/
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']);
$lv=date('F j, Y, g:i a',$ir['laston']);
$h->userdata($ir,$lv,$fm);
$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)
mysql_query("UPDATE users SET prison=0 WHERE userid=$bail", $c);
{
print str_replace("{money}",$r['crimeSUCCESSMUNY'],$r['crimeSTEXT']);
$ir['money']+=$r['crimeSUCCESSMUNY'];
$ir['exp']+=$r['crimeEXP'];
mysql_query("UPDATE users SET money={$ir['money']},exp={$ir['exp']} WHERE userid=$userid",$c);
}
{
print $r['crimeFTEXT'];
}
print "
[url='docrime.php?c={$_GET[']Try Again[/url]

[url='criminal.php']Crimes[/url]";
}
}


$h->endpage();
?>

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.

×
×
  • Create New...