<?
//в оффлайн


foreach(array_keys($game["players"]) as $j) if ($j!=$login) { // раз в минуту
if (time()>$game["loc"][$game["players"][$j]][$j]["time"]+$time_logout) {
if (isset($game["loc"][$game["players"][$j]][$j])) {
// в оффлайн
$gtemp=$game["loc"][$game["players"][$j]][$j];
$gtemp["journal"]=array();
$gtemp["loc"]=$game["players"][$j];
savepl ($gtemp, $j);
unset($game["loc"][$game["players"][$j]][$j]);
if ($info[2]=='f') addjournalall($game["players"][$j],$gtemp["title"]." исчезла",$j); 
else addjournalall($game["players"][$j],$gtemp["title"]." исчез",$j);
unset($game["players"][$j]);
}  else unset($game["players"][$j]);
}
}
$game["lastai"]=time();
?>