Участник
Пользователь
- Сообщения
- 270
- Реакции
- 43
- Помог
- 5 раз(а)
hello all. maybe who can help do it if user legal steam, player in /top15. tag
with this .
with this .
Код:
stock bool:is_user_steam(id)
{
// Author Sh0oter
static dp_pointer;
if(dp_pointer || (dp_pointer = get_cvar_pointer("dp_r_id_provider")))
{
server_cmd("dp_clientinfo %d", id);
server_exec();
return (get_pcvar_num(dp_pointer) == 2) ? true : false ;
}
return false;
}
Код:
// Get and format top 15.
format_top15(id, sBuffer[MAX_BUFFER_LENGTH + 1])
{
new iMax = get_statsnum_sql()
new izStats[8], izBody[8]
new iLen = 0
if (iMax > 15)
iMax = 15
new lKills[16], lDeaths[16], lHits[16], lShots[16], lEff[16], lAcc[16]
formatex(lKills, charsmax(lKills), "%L", id, "KILLS")
formatex(lDeaths, charsmax(lDeaths), "%L", id, "DEATHS")
formatex(lHits, charsmax(lHits), "%L", id, "HITS")
formatex(lShots, charsmax(lShots), "%L", id, "SHOTS")
formatex(lEff, charsmax(lEff), "%L", id, "EFF")
formatex(lAcc, charsmax(lAcc), "%L", id, "ACC")
ucfirst(lEff)
ucfirst(lAcc)
iLen = formatex(sBuffer, charsmax(sBuffer), "<meta charset=utf-8><body bgcolor=#000000><font color=#FFB000><pre>")
iLen += formatex(sBuffer[iLen], charsmax(sBuffer) - iLen, "%2s %-22.22s %6s %6s %6s %6s %4s %4s %4s^n", "#", "Nick", lKills, lDeaths, lHits, lShots, "HS", lEff, lAcc)
for (new i = 0; i < iMax && charsmax(sBuffer) - iLen > 0; i++)
{
get_stats_sql(i, izStats, izBody, t_sName, charsmax(t_sName))
replace_string(t_sName, charsmax(t_sName), "<", "[")
replace_string(t_sName, charsmax(t_sName), ">", "]")
iLen += formatex(sBuffer[iLen], charsmax(sBuffer) - iLen, "%2d %-22.22s %6d %6d %6d %6d %4d %3.0f%% %3.0f%%^n", i + 1, t_sName, izStats[STATS_KILLS],
izStats[STATS_DEATHS], izStats[STATS_HITS], izStats[STATS_SHOTS], izStats[STATS_HS], effec(izStats), accuracy(izStats))
}
}
Download all Attachments
-
49 KB Просмотры: 3
Последнее редактирование: