Onbekend |
|
Hallo,
Ik heb een cronjob ingevoegd in_cron_hour.php:
mysql_query("UPDATE `[users]` SET `autocrime`=`autocrime`=0");
Is dit juist als ik autocrime op 0 wil krijgen?
En hoe komt het dat dit niet gebeurt ieder uur?
Dit is het volledig scriptje:
<?php /* ------------------------- */
mysql_query("UPDATE `[users]` SET `IPs`=''");
mysql_query("UPDATE `[clans]` SET `IPs`=''");
if($cron_pass != "secretcronpassword")
exit;
mysql_query("UPDATE `[users]` SET `cash`=`cash`+1000 WHERE `activated`=1");
mysql_query("UPDATE `[users]` SET `bank`=`bank`+100 WHERE `type`=3 AND `activated`=1");
mysql_query("UPDATE `[clans]` SET `cash`=`cash`+500,`bank`=`bank`+500");
mysql_query("UPDATE `[users]` SET `autocrime`=`autocrime`=0");
$dbres = mysql_query("SELECT * FROM `[clans]` WHERE `money_lvl1` > 0");
while($clan = mysql_fetch_object($dbres)) {
if($clan->type == 1)
mysql_query("UPDATE `[users]` SET `cash`=`cash`+". (50*$clan->money_lvl1) .",`bank`=`bank`+".
(150*$clan->money_lvl1) ." WHERE `clan`='{$clan->name}'");
else if($clan->type == 2)
mysql_query("UPDATE `[users]` SET `cash`=`cash`+". (100*$clan->money_lvl1)
.",`bank`=`bank`+". (100*$clan->money_lvl1) ." WHERE `clan`='{$clan->name}'");
else if($clan->type == 3)
mysql_query("UPDATE `[users]` SET `bank`=`bank`+". (rand(150,300)*$clan->money_lvl1) ." WHERE
`clan`='{$clan->name}'");
}
/* ------------------------- */ ?>
<?php /* ------------------------- */ if($cron_pass != "secretcronpassword") mysql_query("UPDATE `[users]` SET `cash`=`cash`+1000 WHERE `activated`=1"); mysql_query("UPDATE `[users]` SET `bank`=`bank`+100 WHERE `type`=3 AND `activated`=1"); mysql_query("UPDATE `[clans]` SET `cash`=`cash`+500,`bank`=`bank`+500"); mysql_query("UPDATE `[users]` SET `autocrime`=`autocrime`=0"); $dbres = mysql_query("SELECT * FROM `[clans]` WHERE `money_lvl1` > 0"); if($clan->type == 1) mysql_query("UPDATE `[users]` SET `cash`=`cash`+". (50*$clan->money_lvl1) .",`bank`=`bank`+". (150*$clan->money_lvl1) ." WHERE `clan`='{$clan->name}'"); else if($clan->type == 2) mysql_query("UPDATE `[users]` SET `cash`=`cash`+". (100*$clan->money_lvl1) .",`bank`=`bank`+". (100*$clan->money_lvl1) ." WHERE `clan`='{$clan->name}'"); else if($clan->type == 3) mysql_query("UPDATE `[users]` SET `bank`=`bank`+". (rand(150,300)*$clan->money_lvl1) ." WHERE `clan`='{$clan->name}'"); } /* ------------------------- */ ?>
|