HITMAN 17 Posted February 8, 2009 Posted February 8, 2009 $USelectResult=$db->query("SELECT * FROM users WHERE CurrentCrime>0") or die ($db->error()); while ($U=$db->fetch_row($USelectResult)) { $db->query("UPDATE users SET CrimeTime=CrimeTime-1 WHERE userid={$U['userid']} AND CrimeTime>0") or die ($db->error()); if ($U['CrimeTime'] == 0) { $C1=$db->query("SELECT * FROM Crimes WHERE cID={$U['CurrentCrime']}") or die ($db->error()); $C=$db->fetch_row($C1) or die ($db->error()); $db->query("UPDATE users SET CurrentCrime = 0 WHERE userid = {$U['userid']}") or die ($db->error()); $SuccessPercent = $C['cSUCCESSPERC']; $SuccessPerc = rand(1,100); if($SuccessPercent >= $SuccessPerc) { $MoneyGain = rand($C['cMINCASH'],$C['cMAXCASH']); $db->query("UPDATE users SET money=money+{$MoneyGain} WHERE userid={$U['userid']}") or die ($db->error()); $db->query("UPDATE userstats SET labour=labour+{$C['cLABOUR']}, IQ=IQ+{$C['cIQ']} WHERE userid={$U['userid']}") or die ($db->error()); event_add("INSERT INTO events ('', {$U['userid']}, unix_timestamp(), 0, '<font color=green><h4>Crime Complete</h4></font><table border=0> <tr> <td>Cash Gained:</td> <td>\${$MoneyGain}</td> </tr> <tr> <td>IQ Gained:</td> <td>{$C['cIQ']}</td> </tr> <tr> <td>Labour Gained:</td> <td>{$C['cLABOUR']}</td> </tr> <tr colspan=2> <td colspan=2>Complete Speech:</td> </tr> <tr colspan=2> <td colspan=2>[size="1"]{$C['cCOMPLETETEXT']}[/size]</td> </tr> </table>')"; $AlertInsertSub=$db->query($AlertInsert) or die (mysql_error()); } else { $Chance = rand(1,2); if ($Chance == 1) { event_add("INSERT INTO events ('', {$U['userid']}, unix_timestamp(), 0, '<font color=red><h4>Crime Failed</h4></font>')"; $AlertInsertSub=$db->query($AlertInsert) or die (mysql_error()); } if ($Chance == 2) { event_add("INSERT INTO events ('', {$U['userid']}, unix_timestamp(), 0, '<font color=red><h4>Crime Failed</h4></font>[b]')"; $AlertInsertSub=$db->query($AlertInsert) or die (mysql_error()); } } } } ?> i have this cron and it is not working like it does not send an event or credit anyone can someone please help or fix thankyou Quote
Haunted Dawg Posted February 8, 2009 Posted February 8, 2009 Re: Cron Problem This mod is not your's there for i will not help you. Neither did you pay for it. Quote
HITMAN 17 Posted February 8, 2009 Author Posted February 8, 2009 Re: Cron Problem $USelectResult=$db->query("SELECT * FROM users WHERE CurrentCrime>0") or die ($db->error()); while ($U=$db->fetch_row($USelectResult)) { $db->query("UPDATE users SET CrimeTime=CrimeTime-1 WHERE userid={$U['userid']} AND CrimeTime>0") or die ($db->error()); if ($U['CrimeTime'] == 0) { $C1=$db->query("SELECT * FROM Crimes WHERE cID={$U['CurrentCrime']}") or die ($db->error()); $C=$db->fetch_row($C1) or die ($db->error()); $db->query("UPDATE users SET CurrentCrime = 0 WHERE userid = {$U['userid']}") or die ($db->error()); $SuccessPercent = $C['cSUCCESSPERC']; $SuccessPerc = rand(1,100); if($SuccessPercent >= $SuccessPerc) { $MoneyGain = rand($C['cMINCASH'],$C['cMAXCASH']); $db->query("UPDATE users SET money=money+{$MoneyGain} WHERE userid={$U['userid']}") or die ($db->error()); $db->query("UPDATE userstats SET labour=labour+{$C['cLABOUR']}, IQ=IQ+{$C['cIQ']} WHERE userid={$U['userid']}") or die ($db->error()); $AlertInsert="INSERT INTO events ('', {$U['userid']}, unix_timestamp(), 0, '<font color=green><h4>Crime Complete</h4></font><table border=0> <tr> <td>Cash Gained:</td> <td>\${$MoneyGain}</td> </tr> <tr> <td>IQ Gained:</td> <td>{$C['cIQ']}</td> </tr> <tr> <td>Labour Gained:</td> <td>{$C['cLABOUR']}</td> </tr> <tr colspan=2> <td colspan=2>Complete Speech:</td> </tr> <tr colspan=2> <td colspan=2>[size="1"]{$C['cCOMPLETETEXT']}[/size]</td> </tr> </table>')"; $AlertInsertSub=$db->query($AlertInsert) or die (mysql_error()); } else { $Chance = rand(1,2); if ($Chance == 1) { $AlertInsert="INSERT INTO events ('', {$U['userid']}, unix_timestamp(), 0, '<font color=red><h4>Crime Failed</h4></font>')"; $AlertInsertSub=$db->query($AlertInsert) or die (mysql_error()); } if ($Chance == 2) { $AlertInsert="INSERT INTO events ('', {$U['userid']}, unix_timestamp(), 0, '<font color=red><h4>Crime Failed</h4></font>[b]')"; $AlertInsertSub=$db->query($AlertInsert) or die (mysql_error()); } } } } Quote
Haunted Dawg Posted February 8, 2009 Posted February 8, 2009 Re: Cron Problem Sorry i can not help you. Atleast help us by putting [ code] [/ code] tag's around. Quote
HITMAN 17 Posted February 8, 2009 Author Posted February 8, 2009 Re: Cron Problem http://criminalexistence.com/ceforums/i ... ile;u=3902 thats the guy who made and he will not fix at all Quote
Sethenor Posted February 8, 2009 Posted February 8, 2009 Re: Cron Problem Now let me tell you me and toxication made this i was the one who made the cron, this was not ment to be sold but clearly toxication had other idea's so he has gone behind my back and sold it for profit himself I have the cron that works since i was the one that built it i will not fix it for you becuase it wasnt ment to be sold now you can rant and rave it will not get you anywhere with me You will have to try get in contact with toxication to sort this out. Quote
Magictallguy Posted February 8, 2009 Posted February 8, 2009 Re: Cron Problem Removed I was unaware that this was a paid mod Quote
Dave Posted February 9, 2009 Posted February 9, 2009 Re: Cron Problem Now let me tell you me and toxication made this i was the one who made the cron, this was not ment to be sold but clearly toxication had other idea's so he has gone behind my back and sold it for profit himself I have the cron that works since i was the one that built it i will not fix it for you becuase it wasnt ment to be sold now you can rant and rave it will not get you anywhere with me You will have to try get in contact with toxication to sort this out. Toxication would beg for money of me... so doing this dosen't surprise me. Quote
HITMAN 17 Posted February 9, 2009 Author Posted February 9, 2009 Re: Cron Problem I got the cron just about fixed now the cron dont work can someone help me please cheers Quote
HITMAN 17 Posted February 11, 2009 Author Posted February 11, 2009 Re: Cron Problem i dont get an event can someone try to help me Quote
Dave Posted February 11, 2009 Posted February 11, 2009 Re: Cron Problem NO! Does he keep on pestering you aswell? Quote
Haunted Dawg Posted February 11, 2009 Posted February 11, 2009 Re: Cron Problem No. Only problem is. This is a paid mod and he never paid for it. Quote
HITMAN 17 Posted February 12, 2009 Author Posted February 12, 2009 Re: Cron Problem Ino paddy did and I'm buying it off paddy Quote
Haunted Dawg Posted February 12, 2009 Posted February 12, 2009 Re: Cron Problem You can not buy it off paddy, That would mean paddy is reselling people's mods. 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.