Re: [Lite] Jail
Mine's installed on Lite Version, and i dont have a hospital cron. I tried making a new one, Failed. I tried adding it to my cron_fivemins.php page, Failed.
> Help please...i don't know what i should do.
Code works great thanks, i added a formula for the amount of time you spend in jail here it is:
$jailyes= (int) rand(1,2);
if ($jailyes==1)
{
$jailtime= rand(1,3)*($r['crimeBRAVE'])*($ir['level']/2)+rand(20,60);
mysql_query("UPDATE users SET jail=$jailtime WHERE userid=$userid", $c);
mysql_query("UPDATE users SET jailreason='{$r['crimeJAIL']}' WHERE userid=$userid", $c);
print "
[b]You were caught whilst doing this crime, and have consequently been placed in jail for $jailtime minutes.[/b]";
}
if ($jailyes==2)
{
print $r['crimeFTEXT'];
}
in the crimes table in database you will need to add the field crimeJAIL and into that enter what message prints when you fail the crime, and are put in jail.