Jump to content
MakeWebGames

Crime Problem


ajgraves

Recommended Posts

Evening,

 

I am in need of some urgent help with my site...

 

The problem is that when players try to commit crimes on my game the game is taking more brave than it should. An example is that they try to commit the 1 brave crime, if they get jailed thats fine it takes 1 brave, but if they fail or succeed the game takes 2 brave from the players?

 

Anyone any idea whats going on? The docrime.php and criminal.php codes look fine?

Link to comment
Share on other sites

Re: Crime Problem

 

check again in docrime.php as many people have created this error to their own script.

If it comes down use your original backup of docrime.php and see how that works.(Assuming u didn't add more coding into docrime.php)

Hi mate,

 

Thanks for the reply, but i have done this and also had 2 others look at this for me also :|

 

One of the strangest ones had to be the guy asking to see my header.php to sort the problem but would header.php have anything to do with this issue or was he trying to get my cpanel access?? lol

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...

Re: Crime Problem

 

I had this same problem when i was a first newbie. You should check your header because what happend to my game it refreshed the page after i clicked it.

Say if i do a 7 brave crime it takes 14 brave away. So you should check your header.php

Hi,

Thanks for this, i will pass this onto my coder so that he can have a look as i have no idea what i would be looking for.

Thanks

AJ :mrgreen:

Link to comment
Share on other sites

Re: Crime Problem

 

 <?php 
class headers {
function startheaders() {
global $ir, $set;
echo <<<EOF
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="/mint/?js" type="text/javascript"></script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>{$set['game_name']}</title>
<style type="text/css">
<!--
body {
background-image: url('hoakser_graffiti.jpg');
background-repeat:repeat-x;
background-color: #000000;
margin-top: 0px;
margin-bottom: 0px;
font-family:calibri, helvetica, arial, geneva, sans-serif;font-size:12px; color:white;
  scrollbar-base-color: #005B70; 
  scrollbar-arrow-color: #F3960B;
  scrollbar-DarkShadow-Color: #000000;
}
a:visited,a:active,a:link { color: white;text-decoration: none; }
a:hover {color: white;text-decoration: none; }
table,tr,td { font-family:helvetica, arial, geneva, sans-serif;font-size: 12px; }
img { border:none; }
textarea { font-family:helvetica, arial, geneva, sans-serif;font-size:12px;color: white; }
.table2 {
}
.tablenew {
background-image: url('images/navbar/NAVBOTTOM2.jpg');
background-repeat: no-repeat;
}
.lgrad {
background-image:url(borders2.jpg);
background-repeat:repeat-y;
width:5px;
}
.linegrad {
background-image:url(borders2.jpg));
background-repeat:repeat-y;
background-align: center;
width:2px;
}
.rgrad {
background-image:url(borders2.jpg));
background-repeat:repeat-y;
width:5px;
}
.dgrad {
background-image:url(dgrad.jpg);
background-repeat:repeat-x;
height:38px;
}
.dgradl {
background-image:url(dgradl.jpg);
background-repeat:no-repeat;
height:38px;
width:38px;
}
.dgradr {
background-image:url(dgradr.jpg);
background-repeat:no-repeat;
height:38px;
width:38px;
}
.center {
width:903px;
background-color:#13191a;
vertical-align:top;
text-align:center;
}
table.sample {
border-width: 0px 0px 0px 0px;
border-spacing: 0px;
border-style: none none none none;
border-color: black black black black;
border-collapse: collapse;
background-color: ;
}
table.sample th {
border-width: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
border-style: none none none none;
border-color: black black black black;
background-color: ;
-moz-border-radius: 0px 0px 0px 0px;
}
table.sample td {
border-width: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
border-style: none none none none;
border-color: black black black black;
background-color: ;
-moz-border-radius: 0px 0px 0px 0px;
}
.header{
background-image: url('YouthMafiaHEADER.jpg');
width: 900px;
height:118px;
}
.table {
background-color:#0a0e0f;
border-width:1; 
border-color:#101010; 
border-style:solid;
border-width: 3px;
-moz-border-radius: 10px;
border: solid;
border-color: #222222;
}
.footer {
background-image: url('images/footer.gif');
width: 903px;
height:90px;
}
#footer {
background-image: url('images/footer2.gif');
width: 902px;
height:90px;
}
.content {
background-image: url('images/rpglogin_051.JPG');
background-repeat: no-repeat;
}
.mytable {
border-collapse: collapse;
border-color:#000000; 
}
.tablee{
background-color:#0d1212;
border-width:1; 
border-color:#101010; 
border-style:solid;
border-width: 3px;
-moz-border-radius: 10px;
border: solid;
border-color: #222222;
font-family:calibri, helvetica, arial, geneva, sans-serif;font-size:12px;color: white;
}
.tablee a { 
font-family:calibri, helvetica, arial, geneva, sans-seriff; 
font-size: 12px; 
color: white;
}
.tablee a:visited{ 
font-family:calibri, helvetica, arial, geneva, sans-seriff;
font-size: 12px; 
color: white;
}
.tablee a:hover { 
font-family:calibri, helvetica, arial, geneva, sans-seriff; 
font-size: 12px; 
color: white
}
.table3 {
background-color:#0d1212;
}
.table td {
height:22px;
}
.table3 td {
background-color:#0d1212;
}
td .alt {
background-color:#0d1212;
height:22px;
border-width: 3px;
-moz-border-radius: 10px;
border: solid;
border-color: #222222;
}
td .h {
background-image:url(baa.jpg);
background-repeat:repeat-y;
font-weight: bold;
background-color: #0d1212;
border-width: 3px;
-moz-border-radius: 10px;
border: solid;
border-color: #222222;
}
td .mytable {
font-weight: bold;
background-color: #0d1212;
border-width: 0px;
-moz-border-radius: 10px;
border: none;
border-color: #000000;
}
.table th {
font-weight: bold;
background-color: #0d1212;
border-width: 3px;
-moz-border-radius: 10px;
border: solid;
border-color: #222222;
}
textarea,input,select {
font-family: Tahoma;
color:#99CC00;
font-weight:bold; 
color:silver; 
background-image:url(baa.jpg);
background-color:#060809;
border-width:1; 
border-color:silver; 
border-style:solid;
font-size: 13px;
}
.quotemain  {
color:#EEEEEE;
background-color: #333333;
font-style: italic;
padding: 2px;
border: 1px solid gray;
}
.rightb {
background-image: url('#');
background-repeat: repeat-y;
}
.info {
margin-top: 35px;
margin-right: 50px;
}
hr {
width: 155px;
background-color: #536d7a;
}
-->
</style>
</head>
<center>
<table width="903" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="center">
EOF;
}
function userdata($ir,$lv,$fm,$cm,$dosessh=1) {
global $ir,$db,$c,$userid, $set;
$IP = ($_SERVER['HTTP_X_FORWARDED_FOR'])
   ?  $_SERVER['HTTP_X_FORWARDED_FOR']
   :  $_SERVER['REMOTE_ADDR'];
if ($ir['log'] > 0) {
   	$access = $_SERVER['REQUEST_METHOD'];
$log = $_SERVER['REQUEST_URI'];
$date = date ('F j, Y');
$time = date('g:i:s  a');
mysql_query(
sprintf("INSERT INTO `logs` (
`ID` , `userid` , `IP` , `action` , `time` , `date` , `access`
) VALUES (
NULL , %u, '%s', '%s', '%s', '%s', '%s')",
$userid, $ip,
mysql_real_escape_string($log),
$time, $date, $access));
}
$db->query("UPDATE users SET laston=unix_timestamp(),lastip='$IP' WHERE userid=$userid");
if(!$ir['email'])
{
global $domain;
die ("<body>Your account may be broken. Please mail graves46[at]googlemail.com stating your username and player ID.");
}
if($dosessh && ($_SESSION['attacking'] || $ir['attacking']))
{
print "You lost all your EXP for running from the fight.";
$db->query("UPDATE users SET exp=0,attacking=0 WHERE userid=$userid");
$_SESSION['attacking']=0;
}
$enperc=(int) ($ir['energy']/$ir['maxenergy']*100);
$wiperc=(int) ($ir['will']/$ir['maxwill']*100);
$experc=(int) ( $ir['exp']/$ir['exp_needed']*100);
$experc1=floor($ir['exp']);
$brperc=(int) ($ir['brave']/$ir['maxbrave']*100);
$hpperc=(int) ($ir['hp']/$ir['maxhp']*100);
$enopp=100-$enperc;
$wiopp=100-$wiperc;
$exopp=100-$experc;
$exopp1=floor($ir['exp_needed']);
$bropp=100-$brperc;
$hpopp=100-$hpperc;
$d="";
$_GET['ID'] = abs(@intval($_GET['ID']));
$_GET['viewforum'] = abs(@intval($_GET['viewforum']));
$_GET['viewtopic'] = abs(@intval($_GET['viewtopic']));
$u=$ir['username'];
if($ir['donatordays']) { $u = "<font color=red>{$ir['username']}</font>";$d="[img=donator.gif]"; }
$gn=""; 
global $staffpage;
$bgcolor = '000000';
$avatar = $ir[forums_avatar];
if($avatar == "")
$avatar = "[url='avatars.php']<img src = 'images/noav.gif' width = '75' height = '75'></img>[/url]";
else
$avatar = "[url='avatars.php']<img src = '$ir[forums_avatar]' width = '75' height = '75'></img>[/url]";
print <<<OUT
<div align=left>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="header">
<tr>
<td width="500px">

</td>
<td width = '40'>
	<div style = 'width: 75px; height: 75px; margin-left: -30%;'>
		$avatar
	</div>
</td>	
<td>
[b]Name:[/b]<a href=viewuser.php?u=$userid> $gn{$u} [{$ir['userid']}] $d</a>

[b]Money:[/b] <span id="moneyID">{$fm}</span>

[b]Level:[/b] {$ir['level']}

[b]Points:[/b] {$ir['crystals']}

[[url='logout.php']Logout[/url]]
</td>
<td>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
[b]Energy:[/b] {$enperc}%
</td>
<td>
<img src=redbar.png width=$enperc height=10><img src=333333.png width=$enopp height=10>
</td>
</tr>
<tr>
<td>
[b]Will:[/b] {$wiperc}%
</td>
<td>
<img src=redbar.png width=$wiperc height=10><img src=333333.png width=$wiopp height=10>
</td>
</tr>
<tr>
<td>
[b]Brave:[/b] {$ir['brave']}/{$ir['maxbrave']}
</td>
<td>
<img src=redbar.png width=$brperc height=10><img src=333333.png width=$bropp height=10>
</td>
</tr>
<tr>
<td>
[b]EXP:[/b] {$experc}%
</td>
<td onmouseover="this.T_TITLE='EXP points:';this.T_WIDTH=100; return escape('{$experc1}/{$exopp1}');" >
<img src=redbar.png width=$experc height=10><img src=333333.png width=$exopp height=10>
</td>
</tr>
<tr>
<td>
[b]Health:[/b] {$hpperc}%
</td>
<td>
<img src=redbar.png width=$hpperc height=10><img src=333333.png width=$hpopp height=10>
</td>
</tr>
</td>
</table>
</td>
</tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="20%" bgcolor="#$bgcolor" valign="top">
OUT;
if($ir['fedjail']) {
$q=$db->query("SELECT * FROM fedjail WHERE fed_userid=$userid");
$r=$db->fetch_row($q);
die("[b]<font color=red size=+1>You have been put in the {$set['game_name']} Federal Jail for {$r['fed_days']} day(s).

Reason: {$r['fed_reason']}</font>[/b]</body></html>");
}
if(file_exists('ipbans/'.$IP)) {
die("[b]<font color=red size=+1>Your IP has been banned from {$set['game_name']}, there is no way around this.</font>[/b]</body></html>");
}
}

function menuarea() {
include "mainmenu.php";
global $ir,$c;
$bgcolor = '13191a';
print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"> </td><td width="80%"  class="content" bgcolor="#'.$bgcolor.'" valign="top"><center>[img=#]
';
function is_whole_number($var){
 return (is_numeric($var)&&(intval($var)==floatval($var)));
}
$array = array_merge($_GET, $_POST);
while ($post_cap = current($array)) {
  if ($post_cap < 0) {
print "Illegal Operation";
die("");
   }
  if (is_numeric($post_cap) && !is_whole_number($post_cap)) {
print "Illegal Operation";
die("");
   }
  if(strpos($post_cap, '=') && ($_POST[confirmPage] == "")) {
print "Illegal Operation";
die("");
  }
  next($array);
}
$array_gete = array($_GET);
while ($tick = current($array_gete)) {
  $thekey = key($array_gete);
  $_GET[$thekey] = str_replace("=", "", htmlspecialchars($_GET[$thekey]));
  next($array_gete);
}
$array_poste = array($_POST);
while ($tick = current($array_poste)) {
  $thekey = key($array_poste);
  $_POST[$thekey] = str_replace("=", "", htmlspecialchars($_POST[$thekey]));
  next($array_poste);
if($ir['hospital'])
{
 print "[b]NB:[/b] You are currently in hospital for {$ir['hospital']} minutes.
";
}
if($ir['jail'])
{
 print "[b]NB:[/b] You are currently in jail for {$ir['jail']} minutes.";
}
print "<table class=table><tr><td width=40%>[url='donator.php'][img=donate.JPG][/url]</td><td width=40%>[img=middle.JPG][url='voting.php'][img=vote.JPG][/url]</td></tr></table>";
}
function smenuarea()
{
include "smenu.php";
global $ir,$c;
$bgcolor = '000000';
print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"> </td><td width="80%"  bgcolor="#'.$bgcolor.'" valign="top"><center>';
}
function endpage()
{
global $db;
$q=$db->query("SELECT * FROM users WHERE laston>unix_timestamp()-15*60 ORDER BY laston DESC");
$r1=$db->num_rows($q);
$q=$db->query("SELECT * FROM users");
$r2=$db->num_rows($q);
print <<<OUT
</center>
</td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="0">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>




<div align=center class="footer">
	Total Members : [url="userlist.php"]$r2[/url] | Users Online : [url="usersonline.php"]$r1[/url] | [url="stats.php"]Game Stats[/url]
</div>
</tr>
</table>
</td>
</tr>
</table>
<script language="JavaScript" type="text/javascript" src="scripts/wz_tooltip.js"></script>
</body>
</html>
OUT;
}
}
?>

 

That guys is my header.php, if anyone can see whats causing this for me? I have removed the spaces as requested :-)

Thanks

AJ :mrgreen:

Link to comment
Share on other sites

Re: Crime Problem

Can anyone help in this matter?

I have looked through the coding myself but i have no idea as to what is causing this? :|

Because of this my game can't go live :cry:

If anyone knows about this and knows how to fix please either post here for public knowledge or PM me.

 

Thanks in advance :mrgreen:

Link to comment
Share on other sites

Re: Crime Problem

i am having the same problem its not crimes that the issue its something else e.g. when you buy thing you purchase couble of it when you add to market you add double of the item basically alot of things are doubling im not sure what to do if anyone can help ill really appreciate it maybe some money would help to find the fix

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.

×
×
  • Create New...