case SQL_GETHOT: {
Logging(g_sLogsDir, "stats_inform_", "^"[SQL_GETHOT] Queue Time %f^"", fQueueTime);
new sMotd[MOTD_STRLEN], sTableRowClass[TABLE_ROW_CLASS_STRLEN], iLen, iPos, iRank;
iLen = formatex(sMotd[iLen], charsmax(sMotd),
"<meta charset=utf-8> \
<link href=^"http://filestorage.gmforce.ru/game-force/players_stats/stats.css^" rel=stylesheet type=text/css> \
<body> \
<div>Топ играющих игроков</div></br> \
<table> \
<tr> \
<th width=3%%># \
<th width=37%%>Игрок \
<th width=12%%>Убийств \
<th width=12%%>Смертей \
<th width=12%%>В голову \
<th width=12%%>Скилл \
<th width=12%%>Уровень"
);
new aPlayersID[MAX_PLAYERS], iPlayersNum;
get_players_ex(aPlayersID, iPlayersNum, GetPlayers_ExcludeBots | GetPlayers_ExcludeHLTV);
while(SQL_MoreResults(hQuery)) {
new sAuthID[AUTHID_STRLEN], sAuthIDTemp[AUTHID_STRLEN], sPlayerName[PLAYER_NAME_STRLEN * 3], iKills, iDeaths, iHead, Float:fSkill;
SQL_ReadResult(hQuery, 0, sAuthID, charsmax(sAuthID));
iRank++;
for(new i; i < iPlayersNum; i++) {
get_user_authid(aPlayersID[i], sAuthIDTemp, charsmax(sAuthIDTemp));
if(equal(sAuthID, sAuthIDTemp)) {
iPos++;
SQL_ReadResult(hQuery, 1, sPlayerName, charsmax(sPlayerName));
iKills = SQL_ReadResult(hQuery, 2);
iDeaths = SQL_ReadResult(hQuery, 3);
iHead = SQL_ReadResult(hQuery, 4);
SQL_ReadResult(hQuery, 5, fSkill);
sTableRowClass = (iPos % 2) ? "b" : "";
new sSkillName[SKILL_NAME_STRLEN];
sSkillName = GetSkillName(fSkill);
replace(sSkillName, SKILL_NAME_STRLEN, "+", "p");
replace(sSkillName, SKILL_NAME_STRLEN, "-", "m");
replace(sPlayerName, charsmax(sPlayerName), "<", "<");
iLen += formatex(sMotd[iLen], charsmax(sMotd) - iLen,
"<tr class=%s><td>%d<td>%s<td>%d<td>%d<td>%d<td>%.0f<td class=%s>",
sTableRowClass, iRank, sPlayerName, iKills, iDeaths, iHead, fSkill, sSkillName
);
}
}
SQL_NextRow(hQuery);
}
new id = aData[1];
show_motd(id, sMotd, "Топ играющих");