statsx steam tag

Сообщения
270
Реакции
43
Помог
5 раз(а)
hello all. maybe who can help do it if user legal steam, player in /top15. tag

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))
    }
}

20180720155751_1.jpg
 

Download all Attachments

Последнее редактирование:
Сообщения
1,698
Реакции
1,510
Помог
26 раз(а)
Add in database column "steam". And later show it in motd. Beause your don't know steam status of disconnected players.
 
Сообщения
270
Реакции
43
Помог
5 раз(а)
Код:
// 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)
    
    if(is_user_steam(id))
    {                             
        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, "STEAM STATUS")
        
        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%% [STEAM]^n", i + 1, t_sName, izStats[STATS_KILLS],
            izStats[STATS_DEATHS], izStats[STATS_HITS], izStats[STATS_SHOTS], izStats[STATS_HS], effec(izStats), accuracy(izStats))
        }
        
        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, "STEAM STATUS")
    }
    else
    {                             
        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, "STEAM STATUS")
        
        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%% [NO-STEAM]^n", i + 1, t_sName, izStats[STATS_KILLS],
            izStats[STATS_DEATHS], izStats[STATS_HITS], izStats[STATS_SHOTS], izStats[STATS_HS], effec(izStats), accuracy(izStats))
        }
        
        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, "STEAM STATUS")
        
    }   
    
}
 

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу