ReHLDS/ReAPI Lite Rank System

Gash1sh

Пользователь
Регистрация
19 Янв 2018
Сообщения
246
Симпатии
64
Пол
Мужской
#63
Что именно нужно удалить что бы "Позиция" не отображалась?
 

HoBu4oK

Пользователь
Регистрация
8 Июн 2017
Сообщения
142
Симпатии
52
#64
В начале кода закомментировать строчку

Код:
#define HUD_POSITION // Позиция игрока (на худе) в статистике
 

Nevermore

Пользователь
Регистрация
26 Сен 2017
Сообщения
133
Симпатии
6
#65
Если хочу убрать звук при получений нового уровня надо убрать из исходника
Код:
client_cmd(0, "spk events/task_complete.wav") ??
 

Анатолий

Постоялец
Регистрация
8 Июн 2017
Сообщения
501
Симпатии
164
Пол
Мужской
#66
Если хочу убрать звук при получений нового уровня надо убрать из исходника
Код:
client_cmd(0, "spk events/task_complete.wav") ??
да или сделать так: client_cmd(killer, "spk events/task_complete") тогда звук будет слышал только игруку который поднял уровень.
 

thelow

Пользователь
Регистрация
1 Авг 2017
Сообщения
3
Симпатии
0
Пол
Мужской
#68
А с чем это может быть связано? и как это исправить?
 

Вложения

  • 235,9 KB 59

Vesuvius

НЕ СКРИПТЕР!!!
Команда форума
Администратор
Регистрация
8 Июн 2017
Сообщения
1.467
Симпатии
486
Пол
Мужской
#69
thelow, возможно нету ланг файла.. а возможно можно скинуть плагини под спойлер.. может конфликт какой...
 

Nevermore

Пользователь
Регистрация
26 Сен 2017
Сообщения
133
Симпатии
6
#70
Добрые люди ! Можете посоветовать хорошую статистику (лучше скинуть) для этого плагина ! И потом лучше добавить csstats sql ? или можно без нее обойтись?
 

Gash1sh

Пользователь
Регистрация
19 Янв 2018
Сообщения
246
Симпатии
64
Пол
Мужской
#71
Подскажите как сделать что бы плагин работал в связке с MySQL Stats neugomon?
 

Gash1sh

Пользователь
Регистрация
19 Янв 2018
Сообщения
246
Симпатии
64
Пол
Мужской
#73
Получается ранги игроков сейчас пишет в "csstats.dat" и собственно вопрос какое количетво игроков он туда может вместить. Т.к. насколько помню когда пишешь туда всю стату, то там ограничение на 25000 вроде?
Или я что то путаю?
 

Nevermore

Пользователь
Регистрация
26 Сен 2017
Сообщения
133
Симпатии
6
#74
Gash1sh, d3m37r4, стата от aes подойдет для этого плагина? reamx 183 ! лучше mysql или в csstats.dat ?
 

d3m37r4

Постоялец
Регистрация
8 Июн 2017
Сообщения
434
Симпатии
204
Пол
Мужской
#75
Nevermore, mysql больше данных вывезет, чем запись в файлик (если мы говорим о обычном модуле csx, без доработок).
27 Апр 2018
стата от aes подойдет для этого плагина?
Aes тут не нужен, нужна именно mysql стата фримана.
 

a!max

Пользователь
Регистрация
10 Июн 2017
Сообщения
5
Симпатии
1
Пол
Мужской
#76
Почему при смене карты обнуляется ранг?
 

Анатолий

Постоялец
Регистрация
8 Июн 2017
Сообщения
501
Симпатии
164
Пол
Мужской
#77
Почему при смене карты обнуляется ранг?
потому что стата у тебя не сохраняется возможно)
это включено? если нет то включи.
Код:
csstats addons/amxmodx/data/csstats.dat
csstats_score addons/amxmodx/data/csstats.amxx
 

Varder

Пользователь
Регистрация
9 Июн 2017
Сообщения
25
Симпатии
1
Пол
Мужской
#78
Добавил натив в LT
#define LRS
#if defined LRS native lrs_get_level_name(id, dest[], len) #endif
#if defined LRS static level[64]; lrs_get_level_name(id, level, charsmax(level)) iLen += formatex(sTags[iLen], charsmax(sTags) - iLen, "^1[^4%s^1] ", level) #endif
Вот что при компиляции выдаёт

1540706642965.png
 

Вложения

a!max

Пользователь
Регистрация
10 Июн 2017
Сообщения
5
Симпатии
1
Пол
Мужской
#79
потому что стата у тебя не сохраняется возможно)
это включено? если нет то включи.
Код:
csstats addons/amxmodx/data/csstats.dat
csstats_score addons/amxmodx/data/csstats.amxx
Все проверил, вроде норм, даже ошибок нет с run time, но все ровно не сохраняет :Gamer3:
C++:
/*
    Автор плагина: Анатолий (AcE) Бойко.
    Моя страничка: [URL='https://vk.com/e1337ace']Anatoli Bojko[/URL]
    Профиль Steam: [URL='http://steamcommunity.com/profiles/76561198038775603/']Steam Community :: AcE          #aim.ru[/URL]

    Настройка плагина:

    #define CS_MYSQL - Статистика by SKAJIbnEJIb
    #define CS_MYSQL_HUD_SKILL - Скилл игрока на на худе.

    #define CSSTATSX_SQL - Статистика by SerFreeman1337
    #define CSSTATSX_SQL_HUD_SKILL - Скилл игрока на на худе.

    Если закомментировать #define CS_MYSQL и #define CSSTATSX_SQL
    то плагин будет работать со стандартной статистикой csx, csstats
    #define HUD_POSITION - Позиция игрока (на худе) в статистике.
*/

#define AUTHOR "AcE"
#define VERSION    "1.3 [ReHLDS]"
#define PLUGIN "Lite Rank System"
#define LASTUPDATE "6, November (11), 2017"

#include <amxmodx>
#include <reapi>

#if AMXX_VERSION_NUM < 183
    #include <colorchat>
    #define argbreak strbreak
#endif

//#define CS_MYSQL
//#define CS_MYSQL_HUD_SKILL
#define CSSTATSX_SQL
#define CSSTATSX_SQL_HUD_SKILL
#define HUD_POSITION

#if defined CS_MYSQL
native csstats_get_statsnum()
native csstats_get_user_stats(id, stats[22])
#if defined CS_MYSQL_HUD_SKILL
#define FRAGS 0
#define DEATHS 1
native statsx_get_skill(stats[22], string[] = "", len = 0)
#endif
#endif

#if defined CSSTATSX_SQL
native get_statsnum_sql()
native get_user_stats_sql(index, stats[8], bodyhits[8])
#if defined CSSTATSX_SQL_HUD_SKILL
native get_user_skill(player, &Float:skill)
new const g_skill_letters[][] =
{
    "L-", "L", "L+",
    "M-", "M", "M+",
    "H-", "H", "H+",
    "P-", "P", "P+",
    "G"
}
new Float:g_skill_opt[sizeof g_skill_letters]
#endif
#endif

#if !defined CS_MYSQL && !defined CSSTATSX_SQL
#include <csstats>
#endif

enum _:udata
{
    level, exp, informer
}

new UserData[33][udata]
new Float:HudUpdateInterval
new g_Cvar[11], LEVELS[22], g_MaxPlayers
#define IsUserValid(%1) (1 <= %1 <= g_MaxPlayers)

new const CLASSES[][] =
{
    "", "Курсант", "Рядовой", "Ефрейтор",
    "Мл. Сержант", "Сержант", "Ст. Сержант",
    "Старшина", "Прапорщик", "Ст. Прапорщик",
    "Мл. Лейтенант", "Лейтенант", "Ст. Лейтенант",
    "Капитан", "Майор", "Подполковник",
    "Полковник", "Генерал-майор", "Генерал-лейтенант",
    "Генерал-полковник", "Генерал армии", "Маршал РФ"
}

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_cvar("lrs_version", VERSION, FCVAR_SERVER | FCVAR_SPONLY | FCVAR_UNLOGGED)
    RegisterHookChain(RG_CBasePlayer_Killed, "CBasePlayer_Killed_Post", true)
    register_clcmd("say /lrshud", "informer_switch", 0, "switch experience informer on/off")
    g_Cvar[1] = register_cvar("lrs_add_exp", "2")
    g_Cvar[2] = register_cvar("lrs_add_exp_hs", "3")
    g_Cvar[3] = register_cvar("lrs_levels", "0 100 200 300 400 500 600 1000 1300 1500 2000 2500 3000 4000 5000 10000 20000 30000 40000 50000 100000")
    g_Cvar[4] = register_cvar("lrs_hud_exp_type", "1")
    g_Cvar[5] = register_cvar("lrs_hud_xypos", "0.01 0.22")
    g_Cvar[6] = register_cvar("lrs_hud_color", "150 150 150")
    g_Cvar[7] = register_cvar("lrs_hud_random_color", "0")
    g_Cvar[8] = register_cvar("lrs_hud_update", "1.0")
    HudUpdateInterval = get_pcvar_float(g_Cvar[8])
    set_task(HudUpdateInterval, "lrs_informer", _, _, _, "b")
    g_MaxPlayers = get_maxplayers()
}

public plugin_cfg()
{
    LoadSettings()
    g_Cvar[9] = get_pcvar_num(g_Cvar[1])
    g_Cvar[10] = get_pcvar_num(g_Cvar[2])

    #if defined CSSTATSX_SQL
    #if defined CSSTATSX_SQL_HUD_SKILL
    new levelString[512], stPos, ePos, rawPoint[20], cnt
    new g_pCvarSkill = get_cvar_pointer("aes_statsx_skill")
    get_pcvar_string(g_pCvarSkill, levelString, charsmax(levelString))
    do {
        ePos = strfind(levelString[stPos], " ")
        formatex(rawPoint, ePos, levelString[stPos])
        g_skill_opt[cnt] = str_to_float(rawPoint)
        stPos += ePos + 1; cnt ++
        if (cnt > sizeof g_skill_letters - 1)
            break
    } while(ePos != -1)
    #endif
    #endif

    server_print(""); server_print("   %s Copyright (c) 2017 %s", PLUGIN, AUTHOR)
    server_print("   Version %s build on %s", VERSION, LASTUPDATE); server_print("")
}

public LoadSettings()
{
    new i, LVL[22][16], cvLevels[256]
    get_pcvar_string(g_Cvar[3], cvLevels, 255); trim(cvLevels)
    parse(cvLevels, LVL[0], 15, LVL[1], 15, LVL[2], 15, LVL[3], 15, LVL[4], 15, LVL[5], 15, LVL[6], 15, LVL[7], 15, LVL[8], 15, LVL[9], 15, LVL[10], 15, LVL[11], 15, LVL[12], 15, LVL[13], 15, LVL[14], 15, LVL[15], 15, LVL[16], 15, LVL[17], 15, LVL[18], 15, LVL[19], 15, LVL[20], 15, LVL[21], 15)
    for (i = 0; i < 21; i ++)
        LEVELS[i +1] = str_to_num(LVL)
}

public client_putinserver(id)
{
    arrayset(UserData[id], 0, udata)
    set_task(0.5, "load_client_data", id + 555)
}

public load_client_data(index)
{
    new id = index - 555

    if (!IsUserValid(id)) return

    #if defined CS_MYSQL
        static st[22]
        csstats_get_user_stats(id, st)
    #endif
    #if defined CSSTATSX_SQL
        static st[8], bh[8]
        get_user_stats_sql(id, st, bh)
    #endif
    #if !defined CS_MYSQL && !defined CSSTATSX_SQL
        static st[8], bh[8]
        get_user_stats(id, st, bh)
    #endif

    if (g_Cvar[10] > 1)
    {
        new not_hs_num = st[0] - st[2]
        new hs_points = st[2] * g_Cvar[10]
        new not_hs_points = not_hs_num * g_Cvar[9]
        UserData[id][exp] = hs_points + not_hs_points
    }
    else
    {
        UserData[id][exp] = (st[0] * g_Cvar[9])
    }
    for (new i = 1; i <= 21; i ++)
    {
        if (i < 21)
        {
            if (UserData[id][exp] >= LEVELS && UserData[id][exp] < LEVELS[i +1])
                UserData[id][level] = i
        }
        else
        {
            if (UserData[id][exp] >= LEVELS[21])
                UserData[id][level] = 21
        }
    }
}

public CBasePlayer_Killed_Post(const victim, killer, iGib)
{
    if (!IsUserValid(killer) || !IsUserValid(victim) || killer == victim) return

    if (UserData[killer][level] < 21)
    {
        static TempEXP, headshot
        headshot = get_member(victim, m_bHeadshotKilled)
        TempEXP = (headshot == 1) ? g_Cvar[10] : g_Cvar[9]
        UserData[killer][exp] += TempEXP; lrs_check_level(killer)
    }
}

public lrs_check_level(id)
{
    if (!IsUserValid(id)) return

    static Name[32]
    get_entvar(id, var_netname, Name, charsmax(Name))

    if (UserData[id][level] <= 0)
        UserData[id][level] = 1

    if (UserData[id][exp] < 0)
        UserData[id][exp] = 0

    if (UserData[id][level] < 21)
    {
        if (UserData[id][exp] >= LEVELS[UserData[id][level] +1])
        {
            UserData[id][level] ++
            client_cmd(0, "spk events/task_complete")
            client_print_color(0, print_team_default, "^1[^4LRS^1] Боец ^3%s ^1получил новое звание - ^4%s^1. Поздравляем!", Name, CLASSES[UserData[id][level]])
        }
    }
}

public lrs_informer()
{
    static id, watchId
    static Name[32], buffer[192], len, SyncHudMsg
    if (!SyncHudMsg) SyncHudMsg = CreateHudSyncObj()

   for (id = 1; id <= g_MaxPlayers; id ++)
    {
        if (!IsUserValid(id)) continue
        if (UserData[id][informer]) continue
        ClearSyncHud(id, SyncHudMsg)

        watchId = get_entvar(id, var_iuser2)
        get_entvar(watchId, var_netname, Name, charsmax(Name))

    #if defined HUD_POSITION
        static g_rank[33], g_maxrank
        #if defined CS_MYSQL
            static st[22]
            g_maxrank = csstats_get_statsnum()
            g_rank[id] = csstats_get_user_stats(id, st)
            g_rank[watchId] = csstats_get_user_stats(watchId, st)
        #endif
        #if defined CSSTATSX_SQL
            static st[8], bh[8]
            g_maxrank = get_statsnum_sql()
            g_rank[id] = get_user_stats_sql(id, st, bh)
            g_rank[watchId] = get_user_stats_sql(watchId, st, bh)
        #endif
        #if !defined CS_MYSQL && !defined CSSTATSX_SQL
            static st[8], bh[8]
            g_maxrank = get_statsnum()
            g_rank[id] = get_user_stats(id, st, bh)
            g_rank[watchId] = get_user_stats(watchId, st, bh)
        #endif
    #endif

        if (is_user_alive(id))
        {
            len = format(buffer, charsmax(buffer), "Звание: %s", CLASSES[UserData[id][level]])
            if (UserData[id][level] < 21)
            {
                if (get_pcvar_num(g_Cvar[4]) == 0)
                    len += format(buffer[len], charsmax(buffer) - len, "^nОпыт: [%d/%d]", UserData[id][exp], LEVELS[UserData[id][level] +1])
                else
                {
                    len += format(buffer[len], charsmax(buffer) - len, "^nОпыт: [%d/%d][+%d]", UserData[id][exp], LEVELS[UserData[id][level] +1], (LEVELS[UserData[id][level] +1] - UserData[id][exp]))
                }
            }
            else
            {
                len += format(buffer[len], charsmax(buffer) - len, "^nОпыт: Максимальный")
            }
        #if defined CS_MYSQL
            #if defined CS_MYSQL_HUD_SKILL
            new iRank = csstats_get_user_stats(id, st)
            if (iRank > 0)
            {
                if (st[FRAGS] && st[DEATHS])
                {
                    new szSkill[3], iSkill = statsx_get_skill(st, szSkill, charsmax(szSkill))
                    len += format(buffer[len], charsmax(buffer) - len, "^nСкилл: [%s|%d]", szSkill, iSkill)
                }
            }
            #endif
        #endif
        #if defined CSSTATSX_SQL
            #if defined CSSTATSX_SQL_HUD_SKILL
            new Float:szSkill, szSkill_id
            get_user_skill(id, szSkill)
            szSkill_id = aes_statsx_get_skill_id(szSkill)
            len += format(buffer[len], charsmax(buffer) - len, "^nСкилл: [%s|%.0f]", g_skill_letters[szSkill_id], szSkill)
            #endif
        #endif
        #if defined HUD_POSITION
            len += format(buffer[len], charsmax(buffer) - len, "^nПозиция: [%d из %d]", g_rank[id], g_maxrank)
        #endif
        }
        else
        {
            if (watchId > 0 && !is_user_alive(id))
            {
                len = format(buffer, charsmax(buffer), "Ник: %s", Name)
                len += format(buffer[len], charsmax(buffer) - len, "^nЗвание: %s", CLASSES[UserData[watchId][level]])
                if (UserData[watchId][level] < 21)
                {
                    if (get_pcvar_num(g_Cvar[4]) == 0)
                        len += format(buffer[len], charsmax(buffer) - len, "^nОпыт: [%d/%d]", UserData[watchId][exp], LEVELS[UserData[watchId][level] +1])
                    else
                    {
                        len += format(buffer[len], charsmax(buffer) - len, "^nОпыт: [%d/%d][+%d]", UserData[watchId][exp], LEVELS[UserData[watchId][level] +1], (LEVELS[UserData[watchId][level] +1] - UserData[watchId][exp]))
                    }
                }
                else
                {
                    len += format(buffer[len], charsmax(buffer) - len, "^nОпыт: Максимальный")
                }
            #if defined CS_MYSQL
                #if defined CS_MYSQL_HUD_SKILL
                new iRank = csstats_get_user_stats(watchId, st)
                if (iRank > 0)
                {
                    if (st[FRAGS] && st[DEATHS])
                    {
                        new szSkill[3], iSkill = statsx_get_skill(st, szSkill, charsmax(szSkill))
                        len += format(buffer[len], charsmax(buffer) - len, "^nСкилл: [%s|%d]", szSkill, iSkill)
                    }
                }
                #endif
            #endif
            #if defined CSSTATSX_SQL
                #if defined CSSTATSX_SQL_HUD_SKILL
                new Float:szSkill, szSkill_id
                get_user_skill(watchId, szSkill)
                szSkill_id = aes_statsx_get_skill_id(szSkill)
                len += format(buffer[len], charsmax(buffer) - len, "^nСкилл: [%s|%.0f]", g_skill_letters[szSkill_id], szSkill)
                #endif
            #endif
            #if defined HUD_POSITION
                len += format(buffer[len], charsmax(buffer) - len, "^nПозиция: [%d из %d]", g_rank[watchId], g_maxrank)
            #endif
            }
        }
        static r, g, b, Float:x, Float:y
        HudMsgPos(x, y); HudMsgColor(g_Cvar[6], r, g, b)
        if (get_pcvar_num(g_Cvar[7]) == 0)
            set_hudmessage(r, g, b, x, y, 0, 0.0, HudUpdateInterval, _, _, -1)
        else
        {
            set_hudmessage(random_num(0, 255), random_num(0, 255), random_num(0, 255), x, y, 0, 0.0, HudUpdateInterval, _, _, -1)
        }
        ShowSyncHudMsg(id, SyncHudMsg, "%s", buffer)
    }
}

public informer_switch(id)
{
    if (!IsUserValid(id)) return

    if (UserData[id][informer])
    {
        UserData[id][informer] = 0
        client_cmd(id, "spk fvox/activated")
        client_print_color(id, print_team_default, "^1[^4LRS^1] ^3Информер ^1<^4Включён^1>")
    }
    else
    {
        UserData[id][informer] = 1
        client_cmd(id, "spk fvox/deactivated")
        client_print_color(id, print_team_default, "^1[^4LRS^1] ^3Информер ^1<^4Выключен^1>")
    }
}

public plugin_natives()
    register_native("lrs_get_level_name", "_lrs_get_level_name")

public _lrs_get_level_name(plugin, params)
{
    new buffer[192]
    new id = get_param(1)
    new len = get_param(3)
    format(buffer, len, "%s", CLASSES[UserData[id][level]])
    set_string(2, buffer, len)
}

stock HudMsgPos(&Float:x, &Float:y)
{
    static coords[16], piece[10]
    get_pcvar_string(g_Cvar[5], coords, 15)
    argbreak(coords, piece, 9, coords, 15)
    x = str_to_float(piece)
    y = str_to_float(coords)
}

stock HudMsgColor(cvar, &r, &g, &b)
{
    static color[16], piece[5]
    get_pcvar_string(cvar, color, 15)
    argbreak(color, piece, 4, color, 15)
    r = str_to_num(piece)
    argbreak(color, piece, 4, color, 15)
    g = str_to_num(piece)
    b = str_to_num(color)
}

#if defined CSSTATSX_SQL
#if defined CSSTATSX_SQL_HUD_SKILL
aes_statsx_get_skill_id(Float:szSkill)
{
    for (new i; i < sizeof g_skill_opt; i ++)
    {
        if (szSkill < g_skill_opt)
        {
            return i
        }
    }
    return (sizeof g_skill_opt - 1)
}
#endif
#endif
C++:
// This file was auto-generated by AMX Mod X (v1.9.0.5232)
// Cvars for plugin "CSStatsX SQL" by "serfreeman1337" (csstatsx_sql.amxx, v0.7.4+1)[/HIDE][HIDE=][/hide][HIDE=][/hide][HIDE=]


// Plugin version
// Do not edit this cvar
// -
// Default: "0.7.4+1"
csstatsx_sql "0.7.4+1"

// MySQL host
// -
// Default: "localhost"
amx_sql_host "localhost"

// MySQL user
// -
// Default: "root"
-------hide

// MySQL user password
// -
// Default: ""
-----hide

// DB Name
// -
// Default: "amxx"
amx_sql_db "hide"

// Table name
// -
// Default: "csstats"
csstats_sql_table "csstats"

// Database type
// mysql - MySQL
// sqlite - SQLite
// -
// Default: "mysql"
csstats_sql_type "mysql"   <- [COLOR=rgb(0, 168, 133)][B]МОЖЕТ ТУТ ЧЕ НИТАК?[/B][/COLOR]

// Auto create tables
// 0 - don't send create table query
// 1 - send create table query on map load
// -
// Default: "1"
csstats_sql_create_db "1"

// How to update player stats in db
// -2 - on death and disconnect
// -1 - on round end and disconnect
// 0 - on disconnect
// higher than 0 - every n seconds and disconnect
// -
// Default: "-1"
csstats_sql_update "-1"

// Enable own forwards for client_death, client_damage
// 0 - disable
// 1 - enable. required if you want replace csx module
// -
// Default: "0"
csstats_sql_forwards "0"

// How to rank player
// 0 - kills- deaths - tk
// 1 - kills
// 2 - kills + hs
// 3 - skill
// 4 - online time
// -
// Default: "0"
csstats_sql_rankformula "0"

// Skill formula
// 0 - The ELO Method
// -
// Default: "0"
csstats_sql_skillformula "0"

// Enable weapon stats (/rankstats)
// 0 - disable
// 1 - enable
// This will create new table csstats_weapons in your database
// NOTE: table will be created only if you set cvar csstats_sql_create_db to 1
// -
// Default: "0"
csstats_sql_weapons "0"

// Enable player session stats (/sestats)
// 0 - disable
// 1 - enable
// NOTE: you need to import csstats_maps.sql
// Check install instructions
// -
// Default: "0"
csstats_sql_maps "0"

// Number of inactive days after which player's stats will be retested. (prune function)
// -
// Default: "0"
csstats_sql_autoclear "0"

// Cache option
// -1 - enabled
// 0 - disabled
// NOTE: Doesn't work with csstats_sql_update -2 or 0
// -
// Default: "-1"
csstats_sql_cachetime "-1"

// Full stats reset in specified day of month
// -
// Default: "0"
csstats_sql_autoclear_day "0"

// Minimum damage to count assist
// 0 - disable this feature
// -
// Default: "50"
csstats_sql_assisthp "50"

// Rank mode
// 0 - by nick
// 1 - by authid
// 2 - by ip
// -
// Default: "1"
csstats_rank "1"

// Rank bots
// 0 - do not rank bots
// 1 - rank bots
// -
// Default: "1"
csstats_rankbots "1"

// Pause stats
// 0 - do not pause stats
// 1 - pause stats
// -
// Default: "0"
csstats_pause "0"
C++:
[  1] Admin Loader            1.5.4       neygomon          admin_loader_fo  running
[  2] FreshBans               1.3.6       kanagava          fresh_bans.amxx  running
[  3] ReAimDetector API       0.2.2       ReHLDS Team       reaimdetector.a  running
[  4] Ping Checker            26.0.1 RC1  h1k3              ping_checker.am  running
[  5] ReCSDM Main             3.6         ReCSDM Team       recsdm.amxx      running
[  6] CSStatsX SQL            0.7.4+1     serfreeman1337    csstatsx_sql.am  running
[  7] Lite Rank System        1.3 [ReHLD  AcE               re_lrs_csstats.  debug
[  8] Chat Manager            1.1.1-11    Mistrick          chatmanager.amx  running
[  9] Chat Manager: Addon     0.0.4-70    Mistrick          chatmanager_add  running
[ 10] Sentry guns             0.5.3       JGHG & GlobalMod  new_sentry_guns  running
[ 11] Ad From Server          1.0         BadMandarin       ad_from_server.  running
[ 12] AFK Control             1.4.1 [NoR  neygomon          afk_control.amx  running
[ 13] Admin Chat              1.9.0.5232  AMXX Dev Team     adminchat.amxx   running
[ 14] Admin Commands          1.9.0.5232  AMXX Dev Team     admincmd.amxx    running
[ 15] Commands Menu           1.9.0.5232  AMXX Dev Team     cmdmenu.amxx     running
[ 16] Menus Front-End         1.9.0.5232  AMXX Dev Team     menufront.amxx   running
[ 17] Maps Menu               1.9.0.5232  AMXX Dev Team     mapsmenu.amxx    running
[ 18] Players Menu            1.9.0.5232  AMXX Dev Team     plmenu.amxx      running
[ 19] Plugin Menu             1.9.0.5232  AMXX Dev Team     pluginmenu.amxx  running
[ 20] Restrict Weapons        1.8.2       AMXX Dev Team     restmenu.amxx    running
[ 21] GoldMenu                v2          amax              goldmenu.amxx    running
[ 22] Admin Votes             1.9.0.5232  AMXX Dev Team     adminvote.amxx   running
[ 23] CS Misc. Stats          1.8.2       AMXX Dev Team     miscstats.amxx   running
[ 24] CS Stats Logging        1.8.2       AMXX Dev Team     stats_logging.a  running
[ 25] Stats Configuration     1.9.0.5232  AMXX Dev Team     statscfg.amxx    running
[ 26] [ReAPI] Block 'Fire in  0.0.1       sergrib           block_fire_in_t  running
[ 27] Menu                    1.01        amax              menu_server.amx  running
[ 28] unknown                 unknown     unknown           gamename_change  running
[ 29] Unlimited Ammo          0.0.3       Vaqtincha         Unlimited_Ammo.  running
[ 30] [CSDM] Multijump        0.1         di.alyabev        2jump.amxx       running
[ 31] Golden Ak 47            1.0         AlejandroSk       golden_ak_47.am  running
[ 32] Admin Money             0.9.3       f117bomb          admin_money.amx  running
[ 33] golden m4a1             1.0         Alicx DarK        golden_m4a1.amx  running
[ 34] Golden Deagle           1.0         GANNIBALISHE      golden_deagle.a  running
[ 35] Gold AWP                1.0         nick              gold_awp.amxx    running
[ 36] Parachute for ALL [ReA  3.0         Leo_[BH]          parachute_for_a  running
[ 37] Build Dispenser Advanc  #1.7.4      tuty/Notepad      build_dispenser  running
[ 38] Give Money              1.0         Cs-StrikeS.Moy.S  give_money.amxx  running
[ 39] CS Shop                 5.0         iNeedHelp         cs_shop.amxx     running
[ 40] Map Manager: Core       3.0.0       Mistrick          map_manager.amx  running
[ 41] LaserMine Entity        1.3d        +ARUKARI- / Safe  best_lasermine_  running
[ 42] RE Vampire              1.0.7       MakapoH, AcE, RE  re_vampire.amxx  running
[ 43] ReCSDM Equip            3.6         ReCSDM Team       csdm_equip.amxx  running
[ 44] ReCSDM Spawns           3.6         ReCSDM Team       csdm_spawn_pres  running
[ 45] ReCSDM Misc             3.6         ReCSDM Team       csdm_misc.amxx   running
[ 46] ReCSDM Stripper         3.6         KWo               csdm_stripper.a  running
[ 47] ReCSDM Protection       3.6         BAILOPAN          csdm_protection  running
[ 48] Map Manager: Scheduler  0.1.0       Mistrick          map_manager_sch  running
[ 49] Map Manager: Rtv        0.0.4       Mistrick          map_manager_rtv  running
[ 50] Map Manager: Nominatio  0.0.8       Mistrick          map_manager_nom  running
[ 51] Map Manager: BlockList  0.0.3       Mistrick          map_manager_blo  running
[ 52] Map Manager: Online so  0.0.2       Mistrick          map_manager_onl  running
[ 53] Map Manager: Effects    0.0.8       Mistrick          map_manager_eff  running
[ 54] Map Manager: Informer   0.0.5       Mistrick          map_manager_inf  running
C++:
[ 1] AMX Mod X        RUN   -    amxmodx.so                  v1.9.0.5232     ini   ANY
[ 2] Reunion          RUN   -    reunion.so                  v0.1.0.133      ini  Start Never
[ 3] ReAuthCheck      RUN   -    reauthcheck.so              v0.1.6          ini  Start Never
[ 4] Rechecker        RUN   -    rechecker.so                v2.5            ini   ANY
[ 5] WHBlocker        RUN   -    whblocker.so                v1.5.695        ini   ANY
[ 6] ReSemiclip       RUN   -    resemiclip.so               v2.3.9          ini   ANY
[ 7] SafeNameAndChat  RUN   -    safenameandchat.so          v1.0            ini   ANY
[ 8] VoiceTranscoder  RUN   -    vtc.so                      v2017RC3        ini   ANY
[ 9] FakeMeta         RUN   -    fakemeta_amxx_i386.so       v1.9.0.5232     pl1   ANY
[10] MySQL            RUN   -    mysql_amxx_i386.so          v1.9.0.5232     pl1   ANY
[11] ReAimDetector    RUN   -    reaimdetector_amxx_i386.so  v0.2.2          pl1   ANY   Never
[12] ReAPI            RUN   -    reapi_amxx_i386.so          v5.6.0.160-dev  pl1   ANY   Never
[13] CStrike          RUN   -    cstrike_amxx_i386.so        v1.9.0.5219     pl1   ANY
[14] ReCSDM           RUN   -    csdm_amxx_i386.so           v3.6            pl1   ANY
[15] Ham Sandwich     RUN   -    hamsandwich_amxx_i386.so    v1.9.0.5232     pl1   ANY
[16] Engine           RUN   -    engine_amxx_i386.so         v1.9.0.5232     pl1   ANY
[17] Fun              RUN   -    fun_amxx_i386.so            v1.9.0.5232     pl1   ANY
[18] CSX              RUN   -    csx_amxx_i386.so            v1.9.0.5219     pl1   ANY
C++:
[ 1] FakeMeta                1.9.0.5232  AMX Mod X Dev Team   running
[ 2] MySQL                   1.9.0.5232  AMX Mod X Dev Team   running
[ 3] ReAimDetector           0.2.2       ReHLDS Team          running
[ 4] ReAPI                   5.6.0.160-  Asmodai & s1lent     running
[ 5] CStrike                 1.9.0.5219  AMX Mod X Dev Team   running
[ 6] ReCSDM                  3.6         Adidasman & s1lent   running
[ 7] Ham Sandwich            1.9.0.5232  AMX Mod X Dev Team   running
[ 8] Engine                  1.9.0.5232  AMX Mod X Dev Team   running
[ 9] Fun                     1.9.0.5232  AMX Mod X Dev Team   running
[10] CSX                     1.9.0.5219  AMX Mod X Dev Team   running
[11] RegEx                   1.9.0.5232  AMX Mod X Dev Team   running
[12] Sockets2                1.8.1.3746  HLSW Dev Team        running
12 modules, 12 correct
C++:
; Configuration file for AMX Mod X

amxx_logs       addons/amxmodx/logs
amxx_configsdir addons/amxmodx/configs
amxx_datadir    addons/amxmodx/data
amxx_modules    addons/amxmodx/configs/modules.ini
amxx_plugins    addons/amxmodx/configs/plugins.ini
amxx_pluginsdir addons/amxmodx/plugins
amxx_modulesdir addons/amxmodx/modules
amxx_vault      addons/amxmodx/data/vault.ini
csstats         addons/amxmodx/data/csstats.dat
csstats_score   addons/amxmodx/data/csstats.amxx

Logging mode
; 0 - no logging
; 1 - one logfile / day
; 2 - one logfile / map
; 3 - HL Logs

amxx_logging 1

; MySQL default timeout

mysql_timeout 60

; Binary logging level
; add these up to get what you want
; these only work with bin logging binaries
; 1  - default
; 2  - log internal string sets/gets
; 4  - log internal formats
; 8  - log all native params
; 16 - log internal function calls (only in debug mode)
; 32 - log line number accesses (only in debug mode)

bin_logging 49

; Maximum binary log size, in megs

max_binlog_size 20

; Plugin optimization flags - add these up to get what you want
; lowering these may stop crashes on very old CPUs
; set 65536 to disable optimizer, NOT 0!
;-------------
; 1 - float arithmetic
; 2 - float comparisons
; 4 - float rounding
optimizer 7

; Admin command flag manager
; 0 - enabled
; 1 - disabled

disableflagman 0
 
Последнее редактирование модератором:

perfectblood0

Команда форума
Администратор
Регистрация
29 Окт 2017
Сообщения
1.236
Симпатии
378
#80
Все проверил, вроде норм, даже ошибок нет с run time, но все ровно не сохраняет :Gamer3:
C++:
/*
    Автор плагина: Анатолий (AcE) Бойко.
    Моя страничка: [URL='https://vk.com/e1337ace']Anatoli Bojko[/URL]
    Профиль Steam: [URL='http://steamcommunity.com/profiles/76561198038775603/']Steam Community :: AcE          #aim.ru[/URL]

    Настройка плагина:

    #define CS_MYSQL - Статистика by SKAJIbnEJIb
    #define CS_MYSQL_HUD_SKILL - Скилл игрока на на худе.

    #define CSSTATSX_SQL - Статистика by SerFreeman1337
    #define CSSTATSX_SQL_HUD_SKILL - Скилл игрока на на худе.

    Если закомментировать #define CS_MYSQL и #define CSSTATSX_SQL
    то плагин будет работать со стандартной статистикой csx, csstats
    #define HUD_POSITION - Позиция игрока (на худе) в статистике.
*/

#define AUTHOR "AcE"
#define VERSION    "1.3 [ReHLDS]"
#define PLUGIN "Lite Rank System"
#define LASTUPDATE "6, November (11), 2017"

#include <amxmodx>
#include <reapi>

#if AMXX_VERSION_NUM < 183
    #include <colorchat>
    #define argbreak strbreak
#endif

//#define CS_MYSQL
//#define CS_MYSQL_HUD_SKILL
#define CSSTATSX_SQL
#define CSSTATSX_SQL_HUD_SKILL
#define HUD_POSITION

#if defined CS_MYSQL
native csstats_get_statsnum()
native csstats_get_user_stats(id, stats[22])
#if defined CS_MYSQL_HUD_SKILL
#define FRAGS 0
#define DEATHS 1
native statsx_get_skill(stats[22], string[] = "", len = 0)
#endif
#endif

#if defined CSSTATSX_SQL
native get_statsnum_sql()
native get_user_stats_sql(index, stats[8], bodyhits[8])
#if defined CSSTATSX_SQL_HUD_SKILL
native get_user_skill(player, &Float:skill)
new const g_skill_letters[][] =
{
    "L-", "L", "L+",
    "M-", "M", "M+",
    "H-", "H", "H+",
    "P-", "P", "P+",
    "G"
}
new Float:g_skill_opt[sizeof g_skill_letters]
#endif
#endif

#if !defined CS_MYSQL && !defined CSSTATSX_SQL
#include <csstats>
#endif

enum _:udata
{
    level, exp, informer
}

new UserData[33][udata]
new Float:HudUpdateInterval
new g_Cvar[11], LEVELS[22], g_MaxPlayers
#define IsUserValid(%1) (1 <= %1 <= g_MaxPlayers)

new const CLASSES[][] =
{
    "", "Курсант", "Рядовой", "Ефрейтор",
    "Мл. Сержант", "Сержант", "Ст. Сержант",
    "Старшина", "Прапорщик", "Ст. Прапорщик",
    "Мл. Лейтенант", "Лейтенант", "Ст. Лейтенант",
    "Капитан", "Майор", "Подполковник",
    "Полковник", "Генерал-майор", "Генерал-лейтенант",
    "Генерал-полковник", "Генерал армии", "Маршал РФ"
}

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_cvar("lrs_version", VERSION, FCVAR_SERVER | FCVAR_SPONLY | FCVAR_UNLOGGED)
    RegisterHookChain(RG_CBasePlayer_Killed, "CBasePlayer_Killed_Post", true)
    register_clcmd("say /lrshud", "informer_switch", 0, "switch experience informer on/off")
    g_Cvar[1] = register_cvar("lrs_add_exp", "2")
    g_Cvar[2] = register_cvar("lrs_add_exp_hs", "3")
    g_Cvar[3] = register_cvar("lrs_levels", "0 100 200 300 400 500 600 1000 1300 1500 2000 2500 3000 4000 5000 10000 20000 30000 40000 50000 100000")
    g_Cvar[4] = register_cvar("lrs_hud_exp_type", "1")
    g_Cvar[5] = register_cvar("lrs_hud_xypos", "0.01 0.22")
    g_Cvar[6] = register_cvar("lrs_hud_color", "150 150 150")
    g_Cvar[7] = register_cvar("lrs_hud_random_color", "0")
    g_Cvar[8] = register_cvar("lrs_hud_update", "1.0")
    HudUpdateInterval = get_pcvar_float(g_Cvar[8])
    set_task(HudUpdateInterval, "lrs_informer", _, _, _, "b")
    g_MaxPlayers = get_maxplayers()
}

public plugin_cfg()
{
    LoadSettings()
    g_Cvar[9] = get_pcvar_num(g_Cvar[1])
    g_Cvar[10] = get_pcvar_num(g_Cvar[2])

    #if defined CSSTATSX_SQL
    #if defined CSSTATSX_SQL_HUD_SKILL
    new levelString[512], stPos, ePos, rawPoint[20], cnt
    new g_pCvarSkill = get_cvar_pointer("aes_statsx_skill")
    get_pcvar_string(g_pCvarSkill, levelString, charsmax(levelString))
    do {
        ePos = strfind(levelString[stPos], " ")
        formatex(rawPoint, ePos, levelString[stPos])
        g_skill_opt[cnt] = str_to_float(rawPoint)
        stPos += ePos + 1; cnt ++
        if (cnt > sizeof g_skill_letters - 1)
            break
    } while(ePos != -1)
    #endif
    #endif

    server_print(""); server_print("   %s Copyright (c) 2017 %s", PLUGIN, AUTHOR)
    server_print("   Version %s build on %s", VERSION, LASTUPDATE); server_print("")
}

public LoadSettings()
{
    new i, LVL[22][16], cvLevels[256]
    get_pcvar_string(g_Cvar[3], cvLevels, 255); trim(cvLevels)
    parse(cvLevels, LVL[0], 15, LVL[1], 15, LVL[2], 15, LVL[3], 15, LVL[4], 15, LVL[5], 15, LVL[6], 15, LVL[7], 15, LVL[8], 15, LVL[9], 15, LVL[10], 15, LVL[11], 15, LVL[12], 15, LVL[13], 15, LVL[14], 15, LVL[15], 15, LVL[16], 15, LVL[17], 15, LVL[18], 15, LVL[19], 15, LVL[20], 15, LVL[21], 15)
    for (i = 0; i < 21; i ++)
        LEVELS[i +1] = str_to_num(LVL)
}

public client_putinserver(id)
{
    arrayset(UserData[id], 0, udata)
    set_task(0.5, "load_client_data", id + 555)
}

public load_client_data(index)
{
    new id = index - 555

    if (!IsUserValid(id)) return

    #if defined CS_MYSQL
        static st[22]
        csstats_get_user_stats(id, st)
    #endif
    #if defined CSSTATSX_SQL
        static st[8], bh[8]
        get_user_stats_sql(id, st, bh)
    #endif
    #if !defined CS_MYSQL && !defined CSSTATSX_SQL
        static st[8], bh[8]
        get_user_stats(id, st, bh)
    #endif

    if (g_Cvar[10] > 1)
    {
        new not_hs_num = st[0] - st[2]
        new hs_points = st[2] * g_Cvar[10]
        new not_hs_points = not_hs_num * g_Cvar[9]
        UserData[id][exp] = hs_points + not_hs_points
    }
    else
    {
        UserData[id][exp] = (st[0] * g_Cvar[9])
    }
    for (new i = 1; i <= 21; i ++)
    {
        if (i < 21)
        {
            if (UserData[id][exp] >= LEVELS && UserData[id][exp] < LEVELS[i +1])
                UserData[id][level] = i
        }
        else
        {
            if (UserData[id][exp] >= LEVELS[21])
                UserData[id][level] = 21
        }
    }
}

public CBasePlayer_Killed_Post(const victim, killer, iGib)
{
    if (!IsUserValid(killer) || !IsUserValid(victim) || killer == victim) return

    if (UserData[killer][level] < 21)
    {
        static TempEXP, headshot
        headshot = get_member(victim, m_bHeadshotKilled)
        TempEXP = (headshot == 1) ? g_Cvar[10] : g_Cvar[9]
        UserData[killer][exp] += TempEXP; lrs_check_level(killer)
    }
}

public lrs_check_level(id)
{
    if (!IsUserValid(id)) return

    static Name[32]
    get_entvar(id, var_netname, Name, charsmax(Name))

    if (UserData[id][level] <= 0)
        UserData[id][level] = 1

    if (UserData[id][exp] < 0)
        UserData[id][exp] = 0

    if (UserData[id][level] < 21)
    {
        if (UserData[id][exp] >= LEVELS[UserData[id][level] +1])
        {
            UserData[id][level] ++
            client_cmd(0, "spk events/task_complete")
            client_print_color(0, print_team_default, "^1[^4LRS^1] Боец ^3%s ^1получил новое звание - ^4%s^1. Поздравляем!", Name, CLASSES[UserData[id][level]])
        }
    }
}

public lrs_informer()
{
    static id, watchId
    static Name[32], buffer[192], len, SyncHudMsg
    if (!SyncHudMsg) SyncHudMsg = CreateHudSyncObj()

   for (id = 1; id <= g_MaxPlayers; id ++)
    {
        if (!IsUserValid(id)) continue
        if (UserData[id][informer]) continue
        ClearSyncHud(id, SyncHudMsg)

        watchId = get_entvar(id, var_iuser2)
        get_entvar(watchId, var_netname, Name, charsmax(Name))

    #if defined HUD_POSITION
        static g_rank[33], g_maxrank
        #if defined CS_MYSQL
            static st[22]
            g_maxrank = csstats_get_statsnum()
            g_rank[id] = csstats_get_user_stats(id, st)
            g_rank[watchId] = csstats_get_user_stats(watchId, st)
        #endif
        #if defined CSSTATSX_SQL
            static st[8], bh[8]
            g_maxrank = get_statsnum_sql()
            g_rank[id] = get_user_stats_sql(id, st, bh)
            g_rank[watchId] = get_user_stats_sql(watchId, st, bh)
        #endif
        #if !defined CS_MYSQL && !defined CSSTATSX_SQL
            static st[8], bh[8]
            g_maxrank = get_statsnum()
            g_rank[id] = get_user_stats(id, st, bh)
            g_rank[watchId] = get_user_stats(watchId, st, bh)
        #endif
    #endif

        if (is_user_alive(id))
        {
            len = format(buffer, charsmax(buffer), "Звание: %s", CLASSES[UserData[id][level]])
            if (UserData[id][level] < 21)
            {
                if (get_pcvar_num(g_Cvar[4]) == 0)
                    len += format(buffer[len], charsmax(buffer) - len, "^nОпыт: [%d/%d]", UserData[id][exp], LEVELS[UserData[id][level] +1])
                else
                {
                    len += format(buffer[len], charsmax(buffer) - len, "^nОпыт: [%d/%d][+%d]", UserData[id][exp], LEVELS[UserData[id][level] +1], (LEVELS[UserData[id][level] +1] - UserData[id][exp]))
                }
            }
            else
            {
                len += format(buffer[len], charsmax(buffer) - len, "^nОпыт: Максимальный")
            }
        #if defined CS_MYSQL
            #if defined CS_MYSQL_HUD_SKILL
            new iRank = csstats_get_user_stats(id, st)
            if (iRank > 0)
            {
                if (st[FRAGS] && st[DEATHS])
                {
                    new szSkill[3], iSkill = statsx_get_skill(st, szSkill, charsmax(szSkill))
                    len += format(buffer[len], charsmax(buffer) - len, "^nСкилл: [%s|%d]", szSkill, iSkill)
                }
            }
            #endif
        #endif
        #if defined CSSTATSX_SQL
            #if defined CSSTATSX_SQL_HUD_SKILL
            new Float:szSkill, szSkill_id
            get_user_skill(id, szSkill)
            szSkill_id = aes_statsx_get_skill_id(szSkill)
            len += format(buffer[len], charsmax(buffer) - len, "^nСкилл: [%s|%.0f]", g_skill_letters[szSkill_id], szSkill)
            #endif
        #endif
        #if defined HUD_POSITION
            len += format(buffer[len], charsmax(buffer) - len, "^nПозиция: [%d из %d]", g_rank[id], g_maxrank)
        #endif
        }
        else
        {
            if (watchId > 0 && !is_user_alive(id))
            {
                len = format(buffer, charsmax(buffer), "Ник: %s", Name)
                len += format(buffer[len], charsmax(buffer) - len, "^nЗвание: %s", CLASSES[UserData[watchId][level]])
                if (UserData[watchId][level] < 21)
                {
                    if (get_pcvar_num(g_Cvar[4]) == 0)
                        len += format(buffer[len], charsmax(buffer) - len, "^nОпыт: [%d/%d]", UserData[watchId][exp], LEVELS[UserData[watchId][level] +1])
                    else
                    {
                        len += format(buffer[len], charsmax(buffer) - len, "^nОпыт: [%d/%d][+%d]", UserData[watchId][exp], LEVELS[UserData[watchId][level] +1], (LEVELS[UserData[watchId][level] +1] - UserData[watchId][exp]))
                    }
                }
                else
                {
                    len += format(buffer[len], charsmax(buffer) - len, "^nОпыт: Максимальный")
                }
            #if defined CS_MYSQL
                #if defined CS_MYSQL_HUD_SKILL
                new iRank = csstats_get_user_stats(watchId, st)
                if (iRank > 0)
                {
                    if (st[FRAGS] && st[DEATHS])
                    {
                        new szSkill[3], iSkill = statsx_get_skill(st, szSkill, charsmax(szSkill))
                        len += format(buffer[len], charsmax(buffer) - len, "^nСкилл: [%s|%d]", szSkill, iSkill)
                    }
                }
                #endif
            #endif
            #if defined CSSTATSX_SQL
                #if defined CSSTATSX_SQL_HUD_SKILL
                new Float:szSkill, szSkill_id
                get_user_skill(watchId, szSkill)
                szSkill_id = aes_statsx_get_skill_id(szSkill)
                len += format(buffer[len], charsmax(buffer) - len, "^nСкилл: [%s|%.0f]", g_skill_letters[szSkill_id], szSkill)
                #endif
            #endif
            #if defined HUD_POSITION
                len += format(buffer[len], charsmax(buffer) - len, "^nПозиция: [%d из %d]", g_rank[watchId], g_maxrank)
            #endif
            }
        }
        static r, g, b, Float:x, Float:y
        HudMsgPos(x, y); HudMsgColor(g_Cvar[6], r, g, b)
        if (get_pcvar_num(g_Cvar[7]) == 0)
            set_hudmessage(r, g, b, x, y, 0, 0.0, HudUpdateInterval, _, _, -1)
        else
        {
            set_hudmessage(random_num(0, 255), random_num(0, 255), random_num(0, 255), x, y, 0, 0.0, HudUpdateInterval, _, _, -1)
        }
        ShowSyncHudMsg(id, SyncHudMsg, "%s", buffer)
    }
}

public informer_switch(id)
{
    if (!IsUserValid(id)) return

    if (UserData[id][informer])
    {
        UserData[id][informer] = 0
        client_cmd(id, "spk fvox/activated")
        client_print_color(id, print_team_default, "^1[^4LRS^1] ^3Информер ^1<^4Включён^1>")
    }
    else
    {
        UserData[id][informer] = 1
        client_cmd(id, "spk fvox/deactivated")
        client_print_color(id, print_team_default, "^1[^4LRS^1] ^3Информер ^1<^4Выключен^1>")
    }
}

public plugin_natives()
    register_native("lrs_get_level_name", "_lrs_get_level_name")

public _lrs_get_level_name(plugin, params)
{
    new buffer[192]
    new id = get_param(1)
    new len = get_param(3)
    format(buffer, len, "%s", CLASSES[UserData[id][level]])
    set_string(2, buffer, len)
}

stock HudMsgPos(&Float:x, &Float:y)
{
    static coords[16], piece[10]
    get_pcvar_string(g_Cvar[5], coords, 15)
    argbreak(coords, piece, 9, coords, 15)
    x = str_to_float(piece)
    y = str_to_float(coords)
}

stock HudMsgColor(cvar, &r, &g, &b)
{
    static color[16], piece[5]
    get_pcvar_string(cvar, color, 15)
    argbreak(color, piece, 4, color, 15)
    r = str_to_num(piece)
    argbreak(color, piece, 4, color, 15)
    g = str_to_num(piece)
    b = str_to_num(color)
}

#if defined CSSTATSX_SQL
#if defined CSSTATSX_SQL_HUD_SKILL
aes_statsx_get_skill_id(Float:szSkill)
{
    for (new i; i < sizeof g_skill_opt; i ++)
    {
        if (szSkill < g_skill_opt)
        {
            return i
        }
    }
    return (sizeof g_skill_opt - 1)
}
#endif
#endif
C++:
// This file was auto-generated by AMX Mod X (v1.9.0.5232)
// Cvars for plugin "CSStatsX SQL" by "serfreeman1337" (csstatsx_sql.amxx, v0.7.4+1)[/HIDE][HIDE=][/hide][HIDE=][/hide][HIDE=]


// Plugin version
// Do not edit this cvar
// -
// Default: "0.7.4+1"
csstatsx_sql "0.7.4+1"

// MySQL host
// -
// Default: "localhost"
amx_sql_host "localhost"

// MySQL user
// -
// Default: "root"
-------hide

// MySQL user password
// -
// Default: ""
-----hide

// DB Name
// -
// Default: "amxx"
amx_sql_db "hide"

// Table name
// -
// Default: "csstats"
csstats_sql_table "csstats"

// Database type
// mysql - MySQL
// sqlite - SQLite
// -
// Default: "mysql"
csstats_sql_type "mysql"   <- [COLOR=rgb(0, 168, 133)][B]МОЖЕТ ТУТ ЧЕ НИТАК?[/B][/COLOR]

// Auto create tables
// 0 - don't send create table query
// 1 - send create table query on map load
// -
// Default: "1"
csstats_sql_create_db "1"

// How to update player stats in db
// -2 - on death and disconnect
// -1 - on round end and disconnect
// 0 - on disconnect
// higher than 0 - every n seconds and disconnect
// -
// Default: "-1"
csstats_sql_update "-1"

// Enable own forwards for client_death, client_damage
// 0 - disable
// 1 - enable. required if you want replace csx module
// -
// Default: "0"
csstats_sql_forwards "0"

// How to rank player
// 0 - kills- deaths - tk
// 1 - kills
// 2 - kills + hs
// 3 - skill
// 4 - online time
// -
// Default: "0"
csstats_sql_rankformula "0"

// Skill formula
// 0 - The ELO Method
// -
// Default: "0"
csstats_sql_skillformula "0"

// Enable weapon stats (/rankstats)
// 0 - disable
// 1 - enable
// This will create new table csstats_weapons in your database
// NOTE: table will be created only if you set cvar csstats_sql_create_db to 1
// -
// Default: "0"
csstats_sql_weapons "0"

// Enable player session stats (/sestats)
// 0 - disable
// 1 - enable
// NOTE: you need to import csstats_maps.sql
// Check install instructions
// -
// Default: "0"
csstats_sql_maps "0"

// Number of inactive days after which player's stats will be retested. (prune function)
// -
// Default: "0"
csstats_sql_autoclear "0"

// Cache option
// -1 - enabled
// 0 - disabled
// NOTE: Doesn't work with csstats_sql_update -2 or 0
// -
// Default: "-1"
csstats_sql_cachetime "-1"

// Full stats reset in specified day of month
// -
// Default: "0"
csstats_sql_autoclear_day "0"

// Minimum damage to count assist
// 0 - disable this feature
// -
// Default: "50"
csstats_sql_assisthp "50"

// Rank mode
// 0 - by nick
// 1 - by authid
// 2 - by ip
// -
// Default: "1"
csstats_rank "1"

// Rank bots
// 0 - do not rank bots
// 1 - rank bots
// -
// Default: "1"
csstats_rankbots "1"

// Pause stats
// 0 - do not pause stats
// 1 - pause stats
// -
// Default: "0"
csstats_pause "0"
C++:
[  1] Admin Loader            1.5.4       neygomon          admin_loader_fo  running
[  2] FreshBans               1.3.6       kanagava          fresh_bans.amxx  running
[  3] ReAimDetector API       0.2.2       ReHLDS Team       reaimdetector.a  running
[  4] Ping Checker            26.0.1 RC1  h1k3              ping_checker.am  running
[  5] ReCSDM Main             3.6         ReCSDM Team       recsdm.amxx      running
[  6] CSStatsX SQL            0.7.4+1     serfreeman1337    csstatsx_sql.am  running
[  7] Lite Rank System        1.3 [ReHLD  AcE               re_lrs_csstats.  debug
[  8] Chat Manager            1.1.1-11    Mistrick          chatmanager.amx  running
[  9] Chat Manager: Addon     0.0.4-70    Mistrick          chatmanager_add  running
[ 10] Sentry guns             0.5.3       JGHG & GlobalMod  new_sentry_guns  running
[ 11] Ad From Server          1.0         BadMandarin       ad_from_server.  running
[ 12] AFK Control             1.4.1 [NoR  neygomon          afk_control.amx  running
[ 13] Admin Chat              1.9.0.5232  AMXX Dev Team     adminchat.amxx   running
[ 14] Admin Commands          1.9.0.5232  AMXX Dev Team     admincmd.amxx    running
[ 15] Commands Menu           1.9.0.5232  AMXX Dev Team     cmdmenu.amxx     running
[ 16] Menus Front-End         1.9.0.5232  AMXX Dev Team     menufront.amxx   running
[ 17] Maps Menu               1.9.0.5232  AMXX Dev Team     mapsmenu.amxx    running
[ 18] Players Menu            1.9.0.5232  AMXX Dev Team     plmenu.amxx      running
[ 19] Plugin Menu             1.9.0.5232  AMXX Dev Team     pluginmenu.amxx  running
[ 20] Restrict Weapons        1.8.2       AMXX Dev Team     restmenu.amxx    running
[ 21] GoldMenu                v2          amax              goldmenu.amxx    running
[ 22] Admin Votes             1.9.0.5232  AMXX Dev Team     adminvote.amxx   running
[ 23] CS Misc. Stats          1.8.2       AMXX Dev Team     miscstats.amxx   running
[ 24] CS Stats Logging        1.8.2       AMXX Dev Team     stats_logging.a  running
[ 25] Stats Configuration     1.9.0.5232  AMXX Dev Team     statscfg.amxx    running
[ 26] [ReAPI] Block 'Fire in  0.0.1       sergrib           block_fire_in_t  running
[ 27] Menu                    1.01        amax              menu_server.amx  running
[ 28] unknown                 unknown     unknown           gamename_change  running
[ 29] Unlimited Ammo          0.0.3       Vaqtincha         Unlimited_Ammo.  running
[ 30] [CSDM] Multijump        0.1         di.alyabev        2jump.amxx       running
[ 31] Golden Ak 47            1.0         AlejandroSk       golden_ak_47.am  running
[ 32] Admin Money             0.9.3       f117bomb          admin_money.amx  running
[ 33] golden m4a1             1.0         Alicx DarK        golden_m4a1.amx  running
[ 34] Golden Deagle           1.0         GANNIBALISHE      golden_deagle.a  running
[ 35] Gold AWP                1.0         nick              gold_awp.amxx    running
[ 36] Parachute for ALL [ReA  3.0         Leo_[BH]          parachute_for_a  running
[ 37] Build Dispenser Advanc  #1.7.4      tuty/Notepad      build_dispenser  running
[ 38] Give Money              1.0         Cs-StrikeS.Moy.S  give_money.amxx  running
[ 39] CS Shop                 5.0         iNeedHelp         cs_shop.amxx     running
[ 40] Map Manager: Core       3.0.0       Mistrick          map_manager.amx  running
[ 41] LaserMine Entity        1.3d        +ARUKARI- / Safe  best_lasermine_  running
[ 42] RE Vampire              1.0.7       MakapoH, AcE, RE  re_vampire.amxx  running
[ 43] ReCSDM Equip            3.6         ReCSDM Team       csdm_equip.amxx  running
[ 44] ReCSDM Spawns           3.6         ReCSDM Team       csdm_spawn_pres  running
[ 45] ReCSDM Misc             3.6         ReCSDM Team       csdm_misc.amxx   running
[ 46] ReCSDM Stripper         3.6         KWo               csdm_stripper.a  running
[ 47] ReCSDM Protection       3.6         BAILOPAN          csdm_protection  running
[ 48] Map Manager: Scheduler  0.1.0       Mistrick          map_manager_sch  running
[ 49] Map Manager: Rtv        0.0.4       Mistrick          map_manager_rtv  running
[ 50] Map Manager: Nominatio  0.0.8       Mistrick          map_manager_nom  running
[ 51] Map Manager: BlockList  0.0.3       Mistrick          map_manager_blo  running
[ 52] Map Manager: Online so  0.0.2       Mistrick          map_manager_onl  running
[ 53] Map Manager: Effects    0.0.8       Mistrick          map_manager_eff  running
[ 54] Map Manager: Informer   0.0.5       Mistrick          map_manager_inf  running
C++:
[ 1] AMX Mod X        RUN   -    amxmodx.so                  v1.9.0.5232     ini   ANY
[ 2] Reunion          RUN   -    reunion.so                  v0.1.0.133      ini  Start Never
[ 3] ReAuthCheck      RUN   -    reauthcheck.so              v0.1.6          ini  Start Never
[ 4] Rechecker        RUN   -    rechecker.so                v2.5            ini   ANY
[ 5] WHBlocker        RUN   -    whblocker.so                v1.5.695        ini   ANY
[ 6] ReSemiclip       RUN   -    resemiclip.so               v2.3.9          ini   ANY
[ 7] SafeNameAndChat  RUN   -    safenameandchat.so          v1.0            ini   ANY
[ 8] VoiceTranscoder  RUN   -    vtc.so                      v2017RC3        ini   ANY
[ 9] FakeMeta         RUN   -    fakemeta_amxx_i386.so       v1.9.0.5232     pl1   ANY
[10] MySQL            RUN   -    mysql_amxx_i386.so          v1.9.0.5232     pl1   ANY
[11] ReAimDetector    RUN   -    reaimdetector_amxx_i386.so  v0.2.2          pl1   ANY   Never
[12] ReAPI            RUN   -    reapi_amxx_i386.so          v5.6.0.160-dev  pl1   ANY   Never
[13] CStrike          RUN   -    cstrike_amxx_i386.so        v1.9.0.5219     pl1   ANY
[14] ReCSDM           RUN   -    csdm_amxx_i386.so           v3.6            pl1   ANY
[15] Ham Sandwich     RUN   -    hamsandwich_amxx_i386.so    v1.9.0.5232     pl1   ANY
[16] Engine           RUN   -    engine_amxx_i386.so         v1.9.0.5232     pl1   ANY
[17] Fun              RUN   -    fun_amxx_i386.so            v1.9.0.5232     pl1   ANY
[18] CSX              RUN   -    csx_amxx_i386.so            v1.9.0.5219     pl1   ANY
C++:
[ 1] FakeMeta                1.9.0.5232  AMX Mod X Dev Team   running
[ 2] MySQL                   1.9.0.5232  AMX Mod X Dev Team   running
[ 3] ReAimDetector           0.2.2       ReHLDS Team          running
[ 4] ReAPI                   5.6.0.160-  Asmodai & s1lent     running
[ 5] CStrike                 1.9.0.5219  AMX Mod X Dev Team   running
[ 6] ReCSDM                  3.6         Adidasman & s1lent   running
[ 7] Ham Sandwich            1.9.0.5232  AMX Mod X Dev Team   running
[ 8] Engine                  1.9.0.5232  AMX Mod X Dev Team   running
[ 9] Fun                     1.9.0.5232  AMX Mod X Dev Team   running
[10] CSX                     1.9.0.5219  AMX Mod X Dev Team   running
[11] RegEx                   1.9.0.5232  AMX Mod X Dev Team   running
[12] Sockets2                1.8.1.3746  HLSW Dev Team        running
12 modules, 12 correct
C++:
; Configuration file for AMX Mod X

amxx_logs       addons/amxmodx/logs
amxx_configsdir addons/amxmodx/configs
amxx_datadir    addons/amxmodx/data
amxx_modules    addons/amxmodx/configs/modules.ini
amxx_plugins    addons/amxmodx/configs/plugins.ini
amxx_pluginsdir addons/amxmodx/plugins
amxx_modulesdir addons/amxmodx/modules
amxx_vault      addons/amxmodx/data/vault.ini
csstats         addons/amxmodx/data/csstats.dat
csstats_score   addons/amxmodx/data/csstats.amxx

Logging mode
; 0 - no logging
; 1 - one logfile / day
; 2 - one logfile / map
; 3 - HL Logs

amxx_logging 1

; MySQL default timeout

mysql_timeout 60

; Binary logging level
; add these up to get what you want
; these only work with bin logging binaries
; 1  - default
; 2  - log internal string sets/gets
; 4  - log internal formats
; 8  - log all native params
; 16 - log internal function calls (only in debug mode)
; 32 - log line number accesses (only in debug mode)

bin_logging 49

; Maximum binary log size, in megs

max_binlog_size 20

; Plugin optimization flags - add these up to get what you want
; lowering these may stop crashes on very old CPUs
; set 65536 to disable optimizer, NOT 0!
;-------------
; 1 - float arithmetic
; 2 - float comparisons
; 4 - float rounding
optimizer 7

; Admin command flag manager
; 0 - enabled
; 1 - disabled

disableflagman 0
Ну у вас статистика сохраняется в базу sql, верно? Где эта база находится? В конфиге все данные верно прописаны? Имя пользователя, пароль, адрес?