<?php
include('cfg.php');

$sql=mysql_query("SELECT * FROM map WHERE die='0' ORDER BY id ASC");
while($m=mysql_fetch_array($sql))
{
	//3 на запад
	$west=mysql_query("SELECT * FROM map WHERE die='0' AND id<'$m[id]' ORDER by id DESC LIMIT 3");
    while($w=mysql_fetch_array($west))
    {
    	add_n($m['id'],$w['id']);
    }
}
?>