Alexis22, ЮЗАЙ СПОЙЛЕР !!! (+/-)
/////////////////////////////////////////////////////////////////
////////////////////// КТО ЗАБИЛ //////////////////////
/////////////////////////////////////////////////////////////////
// 1
if ($rezult[0] > 0) {
$kk1 = mysql_query("SELECT * FROM `m_player` where `kom`='" . $krr1['id'] .
"' AND `sostav`='1' order by line desc LIMIT " . $rezult[0] . ";");
while ($kkom1 = mysql_fetch_array($kk1)) {
$minuta = rand(2, 92);
if ($minuta < 10) {
$minuta = '0' . $minuta;
}
$menus = $menus . '' . $minuta . '|goal|' . $kkom1[id] . '|' . $kkom1['name'] .
'\r\n';
$text = $text . '' . func_text(goal, 1, $minuta, $kkom1['name']) . '\r\n';
$mor1 = $kkom1[mor] + 5;
$goalplay1 = $kkom1[goal] + 1;
mysql_query("update `m_player` set `mor`='" . $mor1 . "', `goal`='" . $goalplay1 .
"' where id='" . $kkom1[id] . "' LIMIT 1;");
$do = array('rus', 'ua', 'en', 'sp', 'it', 'ge', 'fr', 'por', 'bel', 'tur',
'gre', 'go');
if (in_array($art['chemp'], $do)) {
$goal_chemp1 = $kkom1[goal_chemp] + 1;
mysql_query("update `m_player` set `goal_chemp`='" . $goal_chemp1 .
"' where id='" . $kkom1[id] . "' LIMIT 1;");
}
}
}
// 2
if ($rezult[1] > 0) {
$kk2 = mysql_query("SELECT * FROM `m_player` where `kom`='" . $krr2['id'] .
"' AND `sostav`='1' order by line desc LIMIT " . $rezult[1] . ";");
while ($kkom2 = mysql_fetch_array($kk2)) {
$minuta = rand(2, 92);
if ($minuta < 10) {
$minuta = '0' . $minuta;
}
$menus = $menus . '' . $minuta . '|goal|' . $kkom2[id] . '|' . $kkom2['name'] .
'\r\n';
$text = $text . '' . func_text(goal, 2, $minuta, $kkom2['name']) . '\r\n';
$mor2 = $kkom2[mor] + 5;
$goalplay2 = $kkom2[goal] + 1;
mysql_query("update `m_player` set `mor`='" . $mor2 . "', `goal`='" . $goalplay2 .
"' where id='" . $kkom2[id] . "' LIMIT 1;");
$do = array('rus', 'ua', 'en', 'sp', 'it', 'ge', 'fr', 'por', 'bel', 'tur',
'gre', 'go');
if (in_array($art['chemp'], $do)) {
$goal_chemp2 = $kkom2[goal_chemp] + 1;
mysql_query("update `m_player` set `goal_chemp`='" . $goal_chemp2 .
"' where id='" . $kkom2[id] . "' LIMIT 1;");
}
}
}
Как сделать так чтоб забивал гол любой игрок из состава а не тока те которые стоят последние в составе