I need his source code

a119336

Пользователь
Регистрация
5 Фев 2020
Сообщения
8
Симпатии
0
I am willing to pay accordingly $
I need plugin sma
 

Вложения

  • 24,7 KB Просмотры: 11
Последнее редактирование:

perfectblood0

Команда форума
Администратор
Регистрация
29 Окт 2017
Сообщения
2.182
Симпатии
750
Это не так просто и не особо имеет смысл, что за плагин? Какие функции он выполняет?
 

Vaqtincha

Разработчик
Регистрация
28 Янв 2018
Сообщения
591
Симпатии
370
Даже нет норм название файла
 

FIELD LINE

Команда форума
Администратор
Регистрация
11 Июн 2017
Сообщения
69
Симпатии
57
Пол
Мужской
Судя по большому размеру amxx файла, скорее всего это небольшой мод. По декомпилу ссылается на звуки убийств и содержит путь к ranks.ini, так же команды статистики.

Мы не будем гадать, напишите хотя бы функционал плагина.
 

pakilo

Пользователь
Регистрация
14 Июл 2017
Сообщения
49
Симпатии
5
Пол
Мужской
Вот дек >>>>
zz.amxx:
#pragma semicolon 1
#pragma ctrlchar '\'

new TeamName[4][] =
{
    "",
    "TERRORIST",
    "CT",
    "SPECTATOR"
};
new g_msgScoreInfo;
new g_msgDeathMsg;
new g_msgScoreAttrib;
new g_left_sync;
new g_izKilled[33][2];
new kills[33];
new Float:g_doubleKill;
new g_doubleKillId;
new levels[8] =
{
    3, 4, 5, 6, 7, 8, 9, 0
}
new g_Sounds[7][] =
{
    "misc/multikill.wav",
    "misc/ultrakill.wav",
    "misc/killingspree.wav",
    "misc/rampage.wav",
    "misc/unstoppable.wav",
    "misc/monsterkill.wav",
    "misc/godlike.wav"
};
new g_KillingMsg[7][] =
{
    "%s: Multi-Kill!",
    "%s: Ultra-Kill!!!",
    "%s IS ON A KILLING SPREE!!!",
    "%s: RAMPAGE!!!",
    "%s IS UNSTOPPABLE!!!",
    "%s IS A MONSTER!",
    "%s IS GODLIKE!!!"
};
new g_File[64];
new Array:g_SteamID;
new Trie:g_Name;
new Trie:g_Kills;
new Trie:g_Deaths;
new g_Top15[2048];
new bool:g_Sort = 1;
new g_Data[33][66];
new bool:g_Authorized[33];
new g_iOldRank[34];

Float:operator*(Float:,_:)(Float:oper1, oper2)
{
    return oper1 * float(oper2);
}

Float:operator/(Float:,_:)(Float:oper1, oper2)
{
    return oper1 / float(oper2);
}

bool:operator==(Float:,Float:)(Float:oper1, Float:oper2)
{
    return floatcmp(oper1, oper2) == 0;
}

replace_all(String:string[], len, String:what[], String:with[])
{
    new pos = 0;
    new var1 = contain(string, what);
    pos = var1;
    if (var1 == -1)
    {
        return 0;
    }
    new total = 0;
    new with_len = strlen(with);
    new diff = strlen(what) - with_len;
    new total_len = strlen(string);
    new temp_pos = 0;
    while (replace(string[pos], len - pos, what, with))
    {
        pos = with_len + pos;
        total_len -= diff;
        if (pos >= total_len)
        {
            return total;
        }
        else
        {
            temp_pos = contain(string[pos], what);
            if (temp_pos == -1)
            {
                return total;
            }
            else
            {
                pos = temp_pos + pos;
                total++;
            }
            return total;
        }
        return total;
    }
    return total;
}

get_datadir(String:name[], len)
{
    return get_localinfo("amxx_datadir", name, len);
}

public __fatal_ham_error(Ham:id, HamError:err, String:reason[])
{
    !!! Removed Phi
    if (func != -1 && callfunc_begin_i(func, -1) == 1)
    {
        callfunc_push_int(id);
        callfunc_push_int(err);
        callfunc_push_str(reason, false);
        if (callfunc_end() == 1)
        {
            fail = 0;
        }
    }
    if (fail)
    {
        set_fail_state(reason);
    }
    return 0;
}

ColorChat(id, Color:type, String:msg[])
{
    !!! Removed Phi
    if (!get_playersnum(0))
    {
        return 0;
    }
    new message[256];
    switch (type)
    {
        case 1:
        {
            message[0] = 1;
        }
        case 2:
        {
            message[0] = 4;
        }
        default:
        {
            message[0] = 3;
        }
    }
    vformat(message[1], 251, msg, 4);
    message[192] = 0;
    new team = 0;
    new ColorChange = 0;
    new index = 0;
    new MSG_Type = 0;
    if (id)
    {
        MSG_Type = 1;
        index = id;
    }
    else
    {
        index = FindPlayer();
        MSG_Type = 2;
    }
    new var1 = Heap_4;
    var1[0] = 204;
    team = get_user_team(index, var1, 0);
    ColorChange = ColorSelection(index, MSG_Type, type);
    ShowColorMessage(index, MSG_Type, message);
    if (ColorChange)
    {
        Team_Info(index, MSG_Type, TeamName[team][0][0]);
    }
    return 0;
}

ShowColorMessage(id, type, String:message[])
{
    !!! Removed Phi
    static bool:saytext_used;
    static get_user_msgid_saytext;
    if (!saytext_used)
    {
        get_user_msgid_saytext = get_user_msgid("SayText");
        saytext_used = 1;
    }
    message_begin(type, get_user_msgid_saytext, 248, id);
    write_byte(id);
    write_string(message);
    message_end();
    return 0;
}

Team_Info(id, type, String:team[])
{
    !!! Removed Phi
    static bool:teaminfo_used;
    static get_user_msgid_teaminfo;
    if (!teaminfo_used)
    {
        get_user_msgid_teaminfo = get_user_msgid("TeamInfo");
        teaminfo_used = 1;
    }
    message_begin(type, get_user_msgid_teaminfo, 248, id);
    write_byte(id);
    write_string(team);
    message_end();
    return 1;
}

ColorSelection(index, type, Color:Type)
{
    switch (Type)
    {
        case 4:
        {
            new var1 = TeamName;
            return Team_Info(index, type, var1[0][0][var1]);
        }
        case 5:
        {
            return Team_Info(index, type, TeamName[1][0]);
        }
        case 6:
        {
            return Team_Info(index, type, TeamName[2][0]);
        }
        default:
        {
            return 0;
        }
    }
}

FindPlayer()
{
    new i = -1;
    while (get_maxplayers() >= i)
    {
        i++;
        if (is_user_connected(i))
        {
            return i;
        }
    }
    return -1;
}

public plugin_init()
{
    register_plugin("??", "1.0", "Destiny");
    register_event("HLTV", "event_round_start", "a", "1=0", "2=0");
    register_event("ResetHUD", "fw_PlayerSpawn_Post", "b", "");
    register_event("ResetHUD", "reset_hud", "b", "");
    RegisterHam(Ham_Killed, "player", "fw_PlayerKilled", 0);
    RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage", 0);
    RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn_Post", 1);
    register_forward(FM_ClientKill, "fw_ClientKill", 0);
    register_message(get_user_msgid("DeathMsg"), "msg_deathmsg");
    g_msgScoreInfo = get_user_msgid("ScoreInfo");
    g_msgDeathMsg = get_user_msgid("DeathMsg");
    g_msgScoreAttrib = get_user_msgid("ScoreAttrib");
    g_left_sync = CreateHudSyncObj(0);
    get_datadir(g_File, 63);
    add("", 63, "/ranks.ini", 0);
    g_SteamID = ArrayCreate(32, 1);
    g_Name = TrieCreate();
    g_Kills = TrieCreate();
    g_Deaths = TrieCreate();
    LoadRanks();
    new var1 = Heap_4;
    var1[0] = 20636;
    ArraySort(g_SteamID, "SortRanks", var1, 0);
    WriteTop15();
    set_task(15.00, "SortTask", 0, "", 0, "b", 0);
    register_clcmd("say /rank", "SayRank", -1, "", -1);
    register_clcmd("say /top15", "SayTop15", -1, "", -1);
    register_clcmd("say /rankdel", "SayRankdel", -1, "", -1);
    return 0;
}

public plugin_end()
{
    new var1 = Heap_4;
    var1[0] = 20636;
    ArraySort(g_SteamID, "SortRanks", var1, 0);
    SaveRanks();
    ArrayDestroy(g_SteamID);
    return 0;
}

public plugin_precache()
{
    new i = 0;
    i = 0;
    while (i < 7)
    {
        precache_sound(g_Sounds[i][0][0]);
        i++;
    }
    precache_sound("misc/doublekill.wav");
    precache_sound("misc/perfect.wav");
    return 0;
}

public plugin_natives()
{
    register_native("get_user_killer", "native_get_user_killer", 1);
    register_native("get_user_rank", "native_get_user_rank", 1);
    return 0;
}

public client_putinserver(id)
{
    !!! Removed Phi
    kills[id] = 0;
    new name[32];
    get_user_name(id, name, 32);
    get_user_authid(id, g_Data[id][0][0], 31);
    if (!str_to_num(g_Data[id][0][0][10]))
    {
        return 0;
    }
    get_user_name(id, g_Data[id][0][0][32], 31);
    if (!TrieKeyExists(g_Name, g_Data[id][0][0]))
    {
        AddRank(id);
        ColorChat(0, Color:1, "?? ?? ?? \4%s\1 ???", name);
    }
    else
    {
        LoadData(id);
    }
    UpdateRank(id, true);
    g_iOldRank[id] = GetPosition(id);
    g_Authorized[id] = 1;
    new ip[32][33];
    ip[0] = 21560;
    new country[33][46];
    country[0] = 21688;
    get_user_ip(id, ip[id], 31, 0);
    geoip_country(ip[id], country[id], 45);
    if (equal(country[id], 21820, 0))
    {
        if (contain(ip[id], "192.168.") && equal(ip[id], "127.0.0.1", 0) && contain(ip[id], "10.") && contain(ip[id], "172."))
        {
            new var2 = country[id];
            var2[0] = 21956;
        }
        if (equal(ip[id], "loopback", 0))
        {
            new var3 = country[id];
            var3[0] = 22008;
        }
        new var4 = country[id];
        var4[0] = 22024;
    }
    ColorChat(0, Color:1, "\4%s \1? ? ?? ?????. \4(??: %d/%d) \1??: \4%s", name, g_iOldRank[id], ArraySize(g_SteamID), country[id]);
    return 0;
}

public client_disconnect(Client)
{
    g_Authorized[Client] = 0;
    return 0;
}

public client_infochanged(Client)
{
    if (!g_Authorized[Client][0][0])
    {
        return 0;
    }
    static Name[32];
    get_user_info(Client, "name", Name, 31);
    if (equal("", g_Data[Client][0][0][32], 0))
    {
        return 0;
    }
    copy(g_Data[Client][0][0][32], 31, "");
    UpdateRank(Client, true);
    return 0;
}

public event_round_start()
{
    !!! Removed Phi
    new id = 0;
    while (get_maxplayers() >= id)
    {
        if (is_user_connected(id) && is_user_alive(id))
        {
            set_task(random_float(5.00, 15.00), "check_setting", id, "", 0, "", 0);
            id++;
        }
        id++;
    }
    return 0;
}

public check_setting(id)
{
    !!! Removed Phi
    if (!is_user_bot(id) && is_user_connected(id) && is_user_alive(id))
    {
        query_client_cvar(id, "developer", "check_1", 0, "");
    }
    set_task(random_float(5.00, 15.00), "check_setting", id, "", 0, "", 0);
    return 0;
}

public check_1(id, String:cvar[], String:value[])
{
    !!! Removed Phi
    if (equal(value, "1", 0))
    {
        if (!is_user_bot(id) && is_user_connected(id) && is_user_alive(id))
        {
            client_cmd(id, "developer 0");
            server_cmd("kick #%d \"checking developer mod \" ", get_user_userid(id));
        }
    }
    return 0;
}

public SayRank(Client)
{
    !!! Removed Phi
    if (!g_Authorized[Client][0][0] || !Position)
    {
        client_print(Client, print_chat, "* You are not ranked.");
        return 0;
    }
    client_print(Client, print_chat, "* Your rank is %d of %d with %d kills and %d deaths. [Percent %0.1f%%]", Position, ArraySize(g_SteamID), g_Data[Client][0][0][64], g_Data[Client][0][0][65], 100.00/*1120403456*/ * g_Data[Client][0][0][64] / g_Data[Client][0][0][65] + g_Data[Client][0][0][64]);
    return 0;
}

public SayRankdel(Client)
{
    !!! Removed Phi
    if (!g_Authorized[Client][0][0] || !Position)
    {
        client_print(Client, print_chat, "* You are not ranked.");
        return 0;
    }
    g_Data[Client][0][0][64] = 0;
    g_Data[Client][0][0][65] = 0;
    UpdateRank(Client, false);
    client_print(Client, print_chat, "?? ????. [?? ???]");
    return 0;
}

public SayTop15(Client)
{
    show_motd(Client, g_Top15, "Top 15");
    return 0;
}

public fw_PlayerSpawn_Post(id)
{
    !!! Removed Phi
    g_izKilled[id][0][0][0] = 0;
    if (is_user_alive(id))
    {
        new iRank = 0;
        new iOldRank = 0;
        new newRank[32];
        iRank = GetPosition(id);
        newRank[id] = GetPosition(id);
        iOldRank = g_iOldRank[id][0][0];
        if (!iOldRank)
        {
            iOldRank = iRank;
        }
        g_iOldRank[id] = iRank;
        new iDiff = iOldRank - iRank;
        if (0 < iDiff)
        {
            ColorChat(id, Color:1, "\4?????. \1?? ??\4 (%i)", iDiff);
            if (15 >= newRank[id])
            {
                if (5 >= newRank[id])
                {
                    static name[32];
                    get_user_name(id, name, 31);
                    ColorChat(0, Color:6, "?????. \4%s \1? ? \4%d \1? ? ???????", name, newRank[id]);
                    play_sound("misc/godlike.wav");
                }
                static name[32];
                get_user_name(id, name, 31);
                ColorChat(0, Color:1, "?????. \4%s \1? ? \4%d \1? ? ???????", name, newRank[id]);
                play_sound("misc/perfect.wav");
            }
        }
        else
        {
            if (0 > iDiff)
            {
                ColorChat(id, Color:5, "?????. ?? ?? (%i)", iDiff);
            }
        }
    }
    return 0;
}

public reset_hud(id)
{
    new var2 = kills[id][0][0];
    new var1;
    if (levels[0][0] < var2)
    {
        new var3 = kills;
        client_print(id, print_chat, "* You are on a killstreak with %d kills.", var3[id]);
        var1 = var3;
    }
    else
    {
        var1 = var2;
    }
    kills[id] = 0;
    return 0;
}

public fw_TakeDamage(victim, inflictor, attacker, Float:damage, damage_type)
{
    !!! Removed Phi
    if (!is_user_connected(attacker) && !is_user_alive(attacker))
    {
        return 1;
    }
    if (fm_cs_get_user_team(victim) == fm_cs_get_user_team(attacker))
    {
        return 1;
    }
    if (is_user_alive(attacker) && is_user_alive(victim))
    {
        g_izKilled[victim][0][0][0] = attacker;
    }
    return 1;
}

public fw_PlayerKilled(victim, attacker, shouldgib)
{
    !!! Removed Phi
    if (!is_user_connected(victim))
    {
        return 0;
    }
    new killer = g_izKilled[victim][0][0][0];
    if (is_user_connected(killer))
    {
        if (fm_cs_get_user_team(victim) == fm_cs_get_user_team(killer))
        {
            SendDeathMsg(g_izKilled[victim][0][0][0], victim);
            FixDeadAttrib(victim);
            UpdateFrags(g_izKilled[victim][0][0][0], victim, -1, 0, 1);
        }
        else
        {
            SendDeathMsg(g_izKilled[victim][0][0][0], victim);
            FixDeadAttrib(victim);
            UpdateFrags(g_izKilled[victim][0][0][0], victim, 1, 0, 1);
        }
    }
    else
    {
        SendDeathMsg2(g_izKilled[victim][0][0][0], victim);
        FixDeadAttrib(victim);
        UpdateFrags(g_izKilled[victim][0][0][0], victim, 1, 0, 1);
    }
    message_begin(MSG_BROADCAST, get_user_msgid("ScoreAttrib"), 248, 0);
    write_byte(victim);
    write_byte(1);
    message_end();
    if (g_Authorized[victim][0][0])
    {
        g_Data[victim][0][0][65]++;
        g_Sort = 1;
        UpdateRank(victim, false);
    }
    if (fm_cs_get_user_team(victim) == fm_cs_get_user_team(killer))
    {
        if (g_Authorized[killer][0][0] && victim != killer)
        {
            g_Data[killer][0][0][64]--;
            g_Sort = 1;
            UpdateRank(killer, false);
        }
    }
    else
    {
        if (g_Authorized[killer][0][0] && victim != killer)
        {
            g_Data[killer][0][0][64]++;
            g_Sort = 1;
            UpdateRank(killer, false);
        }
    }
    if (is_user_connected(killer))
    {
        new var4 = kills[killer];
        var4 = var4[0][0] + 1;
        kills[victim] = 0;
        new i = 0;
        while (i < 7)
        {
            if (levels[i][0][0] == kills[killer][0][0])
            {
                announce(killer, i);
                return 0;
            }
            i++;
        }
        if (g_doubleKill == nowtime && killer == g_doubleKillId)
        {
            new killname[32];
            get_user_name(killer, killname, 31);
            set_hudmessage(255, 0, 255, -1.00, 0.35, 0, 6.00, 6.00, 0.50, 0.15, -1);
            ShowSyncHudMsg(0, g_left_sync, "Wow %s made a double kill", killname);
            play_sound("misc/doublekill.wav");
        }
        g_doubleKill = nowtime;
        g_doubleKillId = killer;
    }
    return 0;
}

announce(killer, level)
{
    new name[32];
    get_user_name(killer, name, 32);
    set_hudmessage(0, 100, 255, 0.05, 0.50, 2, 0.02, 6.00, 0.01, 0.10, -2);
    ShowSyncHudMsg(0, g_left_sync, g_KillingMsg[level][0][0], name);
    play_sound(g_Sounds[level][0][0]);
    return 0;
}

public msg_deathmsg(msgid, dest, id)
{
    return 1;
}

UpdateFrags(attacker, victim, frags, deaths, scoreboard)
{
    set_pev(attacker, pev_frags, float(frags + pev(attacker, pev_frags)));
    fm_cs_set_user_deaths(victim, deaths + fm_get_user_deaths(victim));
    if (scoreboard)
    {
        if (!is_user_connected(attacker))
        {
            return 0;
        }
        message_begin(MSG_BROADCAST, g_msgScoreInfo, 248, 0);
        write_byte(attacker);
        write_short(pev(attacker, pev_frags));
        write_short(fm_get_user_deaths(attacker));
        write_short(0);
        write_short(fm_cs_get_user_team(attacker));
        message_end();
        if (!is_user_connected(victim))
        {
            return 0;
        }
        message_begin(MSG_BROADCAST, g_msgScoreInfo, 248, 0);
        write_byte(victim);
        write_short(pev(victim, pev_frags));
        write_short(fm_get_user_deaths(victim));
        write_short(0);
        write_short(fm_cs_get_user_team(victim));
        message_end();
    }
    return 0;
}

FixDeadAttrib(id)
{
    message_begin(MSG_BROADCAST, g_msgScoreAttrib, 248, 0);
    write_byte(id);
    write_byte(0);
    message_end();
    return 0;
}

SendDeathMsg(attacker, victim)
{
    message_begin(MSG_BROADCAST, g_msgDeathMsg, 248, 0);
    write_byte(attacker);
    write_byte(victim);
    write_byte(0);
    write_string("knife");
    message_end();
    return 0;
}

SendDeathMsg2(attacker, victim)
{
    message_begin(MSG_BROADCAST, g_msgDeathMsg, 248, 0);
    write_byte(attacker);
    write_byte(victim);
    write_byte(0);
    write_string("fall");
    message_end();
    return 0;
}

fm_cs_set_user_deaths(id, value)
{
    set_pdata_int(id, 444, value, 5);
    return 0;
}

fm_get_user_deaths(id)
{
    return get_pdata_int(id, 444, 5);
}

fm_cs_get_user_team(id)
{
    return get_pdata_int(id, 114, 5);
}

public play_sound(String:sound[])
{
    new players[32];
    new pnum = 0;
    get_players(players, pnum, "c", "");
    new i = 0;
    i = 0;
    while (i < pnum)
    {
        if (!(is_user_connecting(players[i])))
        {
            client_cmd(players[i], "spk %s", sound);
        }
        i++;
    }
    return 0;
}

public native_get_user_killer(victim, attacker)
{
    new var1 = attacker;
    g_izKilled[victim][0][0][0] = var1;
    return var1;
}

public native_get_user_rank(id)
{
    return GetPosition(id);
}

public SortTask()
{
    if (!g_Sort)
    {
        return 0;
    }
    new var1 = Heap_4;
    var1[0] = 20636;
    ArraySort(g_SteamID, "SortRanks", var1, 0);
    WriteTop15();
    SaveRanks();
    return 0;
}

public SortRanks(Array:SteamID, Position1, Position2)
{
    static SteamID1[32];
    ArrayGetString(SteamID, Position1, SteamID1, 31);
    static SteamID2[32];
    ArrayGetString(SteamID, Position2, SteamID2, 31);
    static Kills1;
    TrieGetCell(g_Kills, "", Kills1);
    static Kills2;
    TrieGetCell(g_Kills, "", Kills2);
    static Deaths1;
    TrieGetCell(g_Deaths, "", Deaths1);
    static Deaths2;
    TrieGetCell(g_Deaths, "", Deaths2);
    if (Kills2 - Deaths2 > Kills1 - Deaths1)
    {
        return 1;
    }
    if (Kills2 - Deaths2 < Kills1 - Deaths1)
    {
        return -1;
    }
    return 0;
}

LoadRanks()
{
    new File = fopen("", "r");
    if (!File)
    {
        return 0;
    }
    new Data[96];
    new SteamID[32];
    new Name[32];
    new Kills[16];
    new Deaths[16];
    while (!feof(File))
    {
        fgets(File, Data, 96);
        replace_all(Data, 95, "\n", "");
        if (!strlen(Data))
        {
        }
        else
        {
            parse(Data, SteamID, 31, Name, 31, Kills, 15, Deaths, 15);
            ArrayPushString(g_SteamID, SteamID);
            TrieSetString(g_Name, SteamID, Name);
            TrieSetCell(g_Kills, SteamID, str_to_num(Kills));
            TrieSetCell(g_Deaths, SteamID, str_to_num(Deaths));
        }
    }
    fclose(File);
    return 0;
}

SaveRanks()
{
    !!! Removed Phi
    new File = fopen("", "w+");
    if (!File)
    {
        return 0;
    }
    new Position = 0;
    new Size = ArraySize(g_SteamID);
    new SteamID[32];
    new Name[32];
    new Kills = 0;
    new Deaths = 0;
    while (Position < Size)
    {
        ArrayGetString(g_SteamID, Position, SteamID, 31);
        if (!(5 > strlen(SteamID)))
        {
            TrieGetString(g_Name, SteamID, Name, 31);
            TrieGetCell(g_Kills, SteamID, Kills);
            TrieGetCell(g_Deaths, SteamID, Deaths);
            fprintf(File, "\n%s \"%s\" %d %d", SteamID, Name, Kills, Deaths);
        }
        Position++;
    }
    fclose(File);
    return 0;
}

AddRank(Client)
{
    g_Data[Client][0][0][64] = 0;
    g_Data[Client][0][0][65] = 0;
    ArrayPushString(g_SteamID, g_Data[Client][0][0]);
    TrieSetString(g_Name, g_Data[Client][0][0], g_Data[Client][0][0][32]);
    return 0;
}

LoadData(Client)
{
    TrieGetCell(g_Kills, g_Data[Client][0][0], g_Data[Client][0][0][64]);
    TrieGetCell(g_Deaths, g_Data[Client][0][0], g_Data[Client][0][0][65]);
    return 0;
}

UpdateRank(Client, bool:Name)
{
    if (Name)
    {
        TrieSetString(g_Name, g_Data[Client][0][0], g_Data[Client][0][0][32]);
    }
    TrieSetCell(g_Kills, g_Data[Client][0][0], g_Data[Client][0][0][64]);
    TrieSetCell(g_Deaths, g_Data[Client][0][0], g_Data[Client][0][0][65]);
    return 0;
}

GetPosition(Client)
{
    static SteamID[32];
    static Size;
    static Position;
    Position = 0;
    Size = ArraySize(g_SteamID);
    while (Position < Size)
    {
        ArrayGetString(g_SteamID, Position, SteamID, 31);
        if (equal("", g_Data[Client][0][0], 0))
        {
            return Position + 1;
        }
        Position += 1;
    }
    return 0;
}

WriteTop15()
{
    static Header[94] =
    {
        60, 109, 101, 116, 97, 32, 99, 104, 97, 114, 115, 101, 116, 61, 85, 84, 70, 45, 56, 62, 60, 98, 111, 100, 121, 32, 98, 103, 99, 111, 108, 111, 114, 61, 35, 48, 48, 48, 48, 48, 48, 62, 60, 102, 111, 110, 116, 32, 99, 111, 108, 111, 114, 61, 35, 70, 70, 66, 48, 48, 48, 62, 60, 112, 114, 101, 62, 37, 53, 115, 32, 32, 37, 50, 50, 115, 32, 32, 37, 53, 115, 32, 32, 37, 53, 115, 32, 32, 37, 53, 115, 10, 10, 0
    }
    static Buffer[31] =
    {
        37, 52, 100, 32, 32, 32, 37, 50, 50, 115, 32, 32, 37, 54, 100, 32, 32, 37, 53, 100, 32, 32, 37, 48, 46, 49, 102, 37, 37, 10, 0
    }
    static Deaths;
    static Kills;
    static Name[32];
    static SteamID[32];
    static Size;
    static Position;
    static Length;
    Length = formatex(g_Top15[Length], 2047 - Length, Header, "Rank", "Name", "Kills", "Deaths", "Percent");
    Position = 0;
    Size = min(ArraySize(g_SteamID), 15);
    while (Position < Size)
    {
        ArrayGetString(g_SteamID, Position, SteamID, 31);
        TrieGetString(g_Name, "", Name, 31);
        TrieGetCell(g_Kills, "", Kills);
        TrieGetCell(g_Deaths, "", Deaths);
        Length = formatex(g_Top15[Length], 2047 - Length, Buffer, Position + 1, Name, Kills, Deaths, 100.00/*1120403456*/ * Kills / Deaths + Kills) + Length;
        Position += 1;
    }
    return 0;
}
 

OSTROG

Пользователь
Регистрация
3 Фев 2020
Сообщения
11
Симпатии
0
Пол
Мужской
Все одним и тем-же декомпилятором пользуются, который КряВо работает)
 

a119336

Пользователь
Регистрация
5 Фев 2020
Сообщения
8
Симпатии
0
Судя по большому размеру amxx файла, скорее всего это небольшой мод. По декомпилу ссылается на звуки убийств и содержит путь к ranks.ini, так же команды статистики.

Мы не будем гадать, напишите хотя бы функционал плагина.
.По декомпилу ссылается на звуки убийств и содержит путь к ranks.ini, так же команды статистики.

YES
The plug-in provides the information that the plug-in's rank has been killed
Даже нет норм название файла
Yes, he doesn't have a standard plug-in name
Вот дек >>>>
zz.amxx:
#pragma semicolon 1
#pragma ctrlchar '\'

new TeamName[4][] =
{
    "",
    "TERRORIST",
    "CT",
    "SPECTATOR"
};
new g_msgScoreInfo;
new g_msgDeathMsg;
new g_msgScoreAttrib;
new g_left_sync;
new g_izKilled[33][2];
new kills[33];
new Float:g_doubleKill;
new g_doubleKillId;
new levels[8] =
{
    3, 4, 5, 6, 7, 8, 9, 0
}
new g_Sounds[7][] =
{
    "misc/multikill.wav",
    "misc/ultrakill.wav",
    "misc/killingspree.wav",
    "misc/rampage.wav",
    "misc/unstoppable.wav",
    "misc/monsterkill.wav",
    "misc/godlike.wav"
};
new g_KillingMsg[7][] =
{
    "%s: Multi-Kill!",
    "%s: Ultra-Kill!!!",
    "%s IS ON A KILLING SPREE!!!",
    "%s: RAMPAGE!!!",
    "%s IS UNSTOPPABLE!!!",
    "%s IS A MONSTER!",
    "%s IS GODLIKE!!!"
};
new g_File[64];
new Array:g_SteamID;
new Trie:g_Name;
new Trie:g_Kills;
new Trie:g_Deaths;
new g_Top15[2048];
new bool:g_Sort = 1;
new g_Data[33][66];
new bool:g_Authorized[33];
new g_iOldRank[34];

Float:operator*(Float:,_:)(Float:oper1, oper2)
{
    return oper1 * float(oper2);
}

Float:operator/(Float:,_:)(Float:oper1, oper2)
{
    return oper1 / float(oper2);
}

bool:operator==(Float:,Float:)(Float:oper1, Float:oper2)
{
    return floatcmp(oper1, oper2) == 0;
}

replace_all(String:string[], len, String:what[], String:with[])
{
    new pos = 0;
    new var1 = contain(string, what);
    pos = var1;
    if (var1 == -1)
    {
        return 0;
    }
    new total = 0;
    new with_len = strlen(with);
    new diff = strlen(what) - with_len;
    new total_len = strlen(string);
    new temp_pos = 0;
    while (replace(string[pos], len - pos, what, with))
    {
        pos = with_len + pos;
        total_len -= diff;
        if (pos >= total_len)
        {
            return total;
        }
        else
        {
            temp_pos = contain(string[pos], what);
            if (temp_pos == -1)
            {
                return total;
            }
            else
            {
                pos = temp_pos + pos;
                total++;
            }
            return total;
        }
        return total;
    }
    return total;
}

get_datadir(String:name[], len)
{
    return get_localinfo("amxx_datadir", name, len);
}

public __fatal_ham_error(Ham:id, HamError:err, String:reason[])
{
    !!! Removed Phi
    if (func != -1 && callfunc_begin_i(func, -1) == 1)
    {
        callfunc_push_int(id);
        callfunc_push_int(err);
        callfunc_push_str(reason, false);
        if (callfunc_end() == 1)
        {
            fail = 0;
        }
    }
    if (fail)
    {
        set_fail_state(reason);
    }
    return 0;
}

ColorChat(id, Color:type, String:msg[])
{
    !!! Removed Phi
    if (!get_playersnum(0))
    {
        return 0;
    }
    new message[256];
    switch (type)
    {
        case 1:
        {
            message[0] = 1;
        }
        case 2:
        {
            message[0] = 4;
        }
        default:
        {
            message[0] = 3;
        }
    }
    vformat(message[1], 251, msg, 4);
    message[192] = 0;
    new team = 0;
    new ColorChange = 0;
    new index = 0;
    new MSG_Type = 0;
    if (id)
    {
        MSG_Type = 1;
        index = id;
    }
    else
    {
        index = FindPlayer();
        MSG_Type = 2;
    }
    new var1 = Heap_4;
    var1[0] = 204;
    team = get_user_team(index, var1, 0);
    ColorChange = ColorSelection(index, MSG_Type, type);
    ShowColorMessage(index, MSG_Type, message);
    if (ColorChange)
    {
        Team_Info(index, MSG_Type, TeamName[team][0][0]);
    }
    return 0;
}

ShowColorMessage(id, type, String:message[])
{
    !!! Removed Phi
    static bool:saytext_used;
    static get_user_msgid_saytext;
    if (!saytext_used)
    {
        get_user_msgid_saytext = get_user_msgid("SayText");
        saytext_used = 1;
    }
    message_begin(type, get_user_msgid_saytext, 248, id);
    write_byte(id);
    write_string(message);
    message_end();
    return 0;
}

Team_Info(id, type, String:team[])
{
    !!! Removed Phi
    static bool:teaminfo_used;
    static get_user_msgid_teaminfo;
    if (!teaminfo_used)
    {
        get_user_msgid_teaminfo = get_user_msgid("TeamInfo");
        teaminfo_used = 1;
    }
    message_begin(type, get_user_msgid_teaminfo, 248, id);
    write_byte(id);
    write_string(team);
    message_end();
    return 1;
}

ColorSelection(index, type, Color:Type)
{
    switch (Type)
    {
        case 4:
        {
            new var1 = TeamName;
            return Team_Info(index, type, var1[0][0][var1]);
        }
        case 5:
        {
            return Team_Info(index, type, TeamName[1][0]);
        }
        case 6:
        {
            return Team_Info(index, type, TeamName[2][0]);
        }
        default:
        {
            return 0;
        }
    }
}

FindPlayer()
{
    new i = -1;
    while (get_maxplayers() >= i)
    {
        i++;
        if (is_user_connected(i))
        {
            return i;
        }
    }
    return -1;
}

public plugin_init()
{
    register_plugin("??", "1.0", "Destiny");
    register_event("HLTV", "event_round_start", "a", "1=0", "2=0");
    register_event("ResetHUD", "fw_PlayerSpawn_Post", "b", "");
    register_event("ResetHUD", "reset_hud", "b", "");
    RegisterHam(Ham_Killed, "player", "fw_PlayerKilled", 0);
    RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage", 0);
    RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn_Post", 1);
    register_forward(FM_ClientKill, "fw_ClientKill", 0);
    register_message(get_user_msgid("DeathMsg"), "msg_deathmsg");
    g_msgScoreInfo = get_user_msgid("ScoreInfo");
    g_msgDeathMsg = get_user_msgid("DeathMsg");
    g_msgScoreAttrib = get_user_msgid("ScoreAttrib");
    g_left_sync = CreateHudSyncObj(0);
    get_datadir(g_File, 63);
    add("", 63, "/ranks.ini", 0);
    g_SteamID = ArrayCreate(32, 1);
    g_Name = TrieCreate();
    g_Kills = TrieCreate();
    g_Deaths = TrieCreate();
    LoadRanks();
    new var1 = Heap_4;
    var1[0] = 20636;
    ArraySort(g_SteamID, "SortRanks", var1, 0);
    WriteTop15();
    set_task(15.00, "SortTask", 0, "", 0, "b", 0);
    register_clcmd("say /rank", "SayRank", -1, "", -1);
    register_clcmd("say /top15", "SayTop15", -1, "", -1);
    register_clcmd("say /rankdel", "SayRankdel", -1, "", -1);
    return 0;
}

public plugin_end()
{
    new var1 = Heap_4;
    var1[0] = 20636;
    ArraySort(g_SteamID, "SortRanks", var1, 0);
    SaveRanks();
    ArrayDestroy(g_SteamID);
    return 0;
}

public plugin_precache()
{
    new i = 0;
    i = 0;
    while (i < 7)
    {
        precache_sound(g_Sounds[i][0][0]);
        i++;
    }
    precache_sound("misc/doublekill.wav");
    precache_sound("misc/perfect.wav");
    return 0;
}

public plugin_natives()
{
    register_native("get_user_killer", "native_get_user_killer", 1);
    register_native("get_user_rank", "native_get_user_rank", 1);
    return 0;
}

public client_putinserver(id)
{
    !!! Removed Phi
    kills[id] = 0;
    new name[32];
    get_user_name(id, name, 32);
    get_user_authid(id, g_Data[id][0][0], 31);
    if (!str_to_num(g_Data[id][0][0][10]))
    {
        return 0;
    }
    get_user_name(id, g_Data[id][0][0][32], 31);
    if (!TrieKeyExists(g_Name, g_Data[id][0][0]))
    {
        AddRank(id);
        ColorChat(0, Color:1, "?? ?? ?? \4%s\1 ???", name);
    }
    else
    {
        LoadData(id);
    }
    UpdateRank(id, true);
    g_iOldRank[id] = GetPosition(id);
    g_Authorized[id] = 1;
    new ip[32][33];
    ip[0] = 21560;
    new country[33][46];
    country[0] = 21688;
    get_user_ip(id, ip[id], 31, 0);
    geoip_country(ip[id], country[id], 45);
    if (equal(country[id], 21820, 0))
    {
        if (contain(ip[id], "192.168.") && equal(ip[id], "127.0.0.1", 0) && contain(ip[id], "10.") && contain(ip[id], "172."))
        {
            new var2 = country[id];
            var2[0] = 21956;
        }
        if (equal(ip[id], "loopback", 0))
        {
            new var3 = country[id];
            var3[0] = 22008;
        }
        new var4 = country[id];
        var4[0] = 22024;
    }
    ColorChat(0, Color:1, "\4%s \1? ? ?? ?????. \4(??: %d/%d) \1??: \4%s", name, g_iOldRank[id], ArraySize(g_SteamID), country[id]);
    return 0;
}

public client_disconnect(Client)
{
    g_Authorized[Client] = 0;
    return 0;
}

public client_infochanged(Client)
{
    if (!g_Authorized[Client][0][0])
    {
        return 0;
    }
    static Name[32];
    get_user_info(Client, "name", Name, 31);
    if (equal("", g_Data[Client][0][0][32], 0))
    {
        return 0;
    }
    copy(g_Data[Client][0][0][32], 31, "");
    UpdateRank(Client, true);
    return 0;
}

public event_round_start()
{
    !!! Removed Phi
    new id = 0;
    while (get_maxplayers() >= id)
    {
        if (is_user_connected(id) && is_user_alive(id))
        {
            set_task(random_float(5.00, 15.00), "check_setting", id, "", 0, "", 0);
            id++;
        }
        id++;
    }
    return 0;
}

public check_setting(id)
{
    !!! Removed Phi
    if (!is_user_bot(id) && is_user_connected(id) && is_user_alive(id))
    {
        query_client_cvar(id, "developer", "check_1", 0, "");
    }
    set_task(random_float(5.00, 15.00), "check_setting", id, "", 0, "", 0);
    return 0;
}

public check_1(id, String:cvar[], String:value[])
{
    !!! Removed Phi
    if (equal(value, "1", 0))
    {
        if (!is_user_bot(id) && is_user_connected(id) && is_user_alive(id))
        {
            client_cmd(id, "developer 0");
            server_cmd("kick #%d \"checking developer mod \" ", get_user_userid(id));
        }
    }
    return 0;
}

public SayRank(Client)
{
    !!! Removed Phi
    if (!g_Authorized[Client][0][0] || !Position)
    {
        client_print(Client, print_chat, "* You are not ranked.");
        return 0;
    }
    client_print(Client, print_chat, "* Your rank is %d of %d with %d kills and %d deaths. [Percent %0.1f%%]", Position, ArraySize(g_SteamID), g_Data[Client][0][0][64], g_Data[Client][0][0][65], 100.00/*1120403456*/ * g_Data[Client][0][0][64] / g_Data[Client][0][0][65] + g_Data[Client][0][0][64]);
    return 0;
}

public SayRankdel(Client)
{
    !!! Removed Phi
    if (!g_Authorized[Client][0][0] || !Position)
    {
        client_print(Client, print_chat, "* You are not ranked.");
        return 0;
    }
    g_Data[Client][0][0][64] = 0;
    g_Data[Client][0][0][65] = 0;
    UpdateRank(Client, false);
    client_print(Client, print_chat, "?? ????. [?? ???]");
    return 0;
}

public SayTop15(Client)
{
    show_motd(Client, g_Top15, "Top 15");
    return 0;
}

public fw_PlayerSpawn_Post(id)
{
    !!! Removed Phi
    g_izKilled[id][0][0][0] = 0;
    if (is_user_alive(id))
    {
        new iRank = 0;
        new iOldRank = 0;
        new newRank[32];
        iRank = GetPosition(id);
        newRank[id] = GetPosition(id);
        iOldRank = g_iOldRank[id][0][0];
        if (!iOldRank)
        {
            iOldRank = iRank;
        }
        g_iOldRank[id] = iRank;
        new iDiff = iOldRank - iRank;
        if (0 < iDiff)
        {
            ColorChat(id, Color:1, "\4?????. \1?? ??\4 (%i)", iDiff);
            if (15 >= newRank[id])
            {
                if (5 >= newRank[id])
                {
                    static name[32];
                    get_user_name(id, name, 31);
                    ColorChat(0, Color:6, "?????. \4%s \1? ? \4%d \1? ? ???????", name, newRank[id]);
                    play_sound("misc/godlike.wav");
                }
                static name[32];
                get_user_name(id, name, 31);
                ColorChat(0, Color:1, "?????. \4%s \1? ? \4%d \1? ? ???????", name, newRank[id]);
                play_sound("misc/perfect.wav");
            }
        }
        else
        {
            if (0 > iDiff)
            {
                ColorChat(id, Color:5, "?????. ?? ?? (%i)", iDiff);
            }
        }
    }
    return 0;
}

public reset_hud(id)
{
    new var2 = kills[id][0][0];
    new var1;
    if (levels[0][0] < var2)
    {
        new var3 = kills;
        client_print(id, print_chat, "* You are on a killstreak with %d kills.", var3[id]);
        var1 = var3;
    }
    else
    {
        var1 = var2;
    }
    kills[id] = 0;
    return 0;
}

public fw_TakeDamage(victim, inflictor, attacker, Float:damage, damage_type)
{
    !!! Removed Phi
    if (!is_user_connected(attacker) && !is_user_alive(attacker))
    {
        return 1;
    }
    if (fm_cs_get_user_team(victim) == fm_cs_get_user_team(attacker))
    {
        return 1;
    }
    if (is_user_alive(attacker) && is_user_alive(victim))
    {
        g_izKilled[victim][0][0][0] = attacker;
    }
    return 1;
}

public fw_PlayerKilled(victim, attacker, shouldgib)
{
    !!! Removed Phi
    if (!is_user_connected(victim))
    {
        return 0;
    }
    new killer = g_izKilled[victim][0][0][0];
    if (is_user_connected(killer))
    {
        if (fm_cs_get_user_team(victim) == fm_cs_get_user_team(killer))
        {
            SendDeathMsg(g_izKilled[victim][0][0][0], victim);
            FixDeadAttrib(victim);
            UpdateFrags(g_izKilled[victim][0][0][0], victim, -1, 0, 1);
        }
        else
        {
            SendDeathMsg(g_izKilled[victim][0][0][0], victim);
            FixDeadAttrib(victim);
            UpdateFrags(g_izKilled[victim][0][0][0], victim, 1, 0, 1);
        }
    }
    else
    {
        SendDeathMsg2(g_izKilled[victim][0][0][0], victim);
        FixDeadAttrib(victim);
        UpdateFrags(g_izKilled[victim][0][0][0], victim, 1, 0, 1);
    }
    message_begin(MSG_BROADCAST, get_user_msgid("ScoreAttrib"), 248, 0);
    write_byte(victim);
    write_byte(1);
    message_end();
    if (g_Authorized[victim][0][0])
    {
        g_Data[victim][0][0][65]++;
        g_Sort = 1;
        UpdateRank(victim, false);
    }
    if (fm_cs_get_user_team(victim) == fm_cs_get_user_team(killer))
    {
        if (g_Authorized[killer][0][0] && victim != killer)
        {
            g_Data[killer][0][0][64]--;
            g_Sort = 1;
            UpdateRank(killer, false);
        }
    }
    else
    {
        if (g_Authorized[killer][0][0] && victim != killer)
        {
            g_Data[killer][0][0][64]++;
            g_Sort = 1;
            UpdateRank(killer, false);
        }
    }
    if (is_user_connected(killer))
    {
        new var4 = kills[killer];
        var4 = var4[0][0] + 1;
        kills[victim] = 0;
        new i = 0;
        while (i < 7)
        {
            if (levels[i][0][0] == kills[killer][0][0])
            {
                announce(killer, i);
                return 0;
            }
            i++;
        }
        if (g_doubleKill == nowtime && killer == g_doubleKillId)
        {
            new killname[32];
            get_user_name(killer, killname, 31);
            set_hudmessage(255, 0, 255, -1.00, 0.35, 0, 6.00, 6.00, 0.50, 0.15, -1);
            ShowSyncHudMsg(0, g_left_sync, "Wow %s made a double kill", killname);
            play_sound("misc/doublekill.wav");
        }
        g_doubleKill = nowtime;
        g_doubleKillId = killer;
    }
    return 0;
}

announce(killer, level)
{
    new name[32];
    get_user_name(killer, name, 32);
    set_hudmessage(0, 100, 255, 0.05, 0.50, 2, 0.02, 6.00, 0.01, 0.10, -2);
    ShowSyncHudMsg(0, g_left_sync, g_KillingMsg[level][0][0], name);
    play_sound(g_Sounds[level][0][0]);
    return 0;
}

public msg_deathmsg(msgid, dest, id)
{
    return 1;
}

UpdateFrags(attacker, victim, frags, deaths, scoreboard)
{
    set_pev(attacker, pev_frags, float(frags + pev(attacker, pev_frags)));
    fm_cs_set_user_deaths(victim, deaths + fm_get_user_deaths(victim));
    if (scoreboard)
    {
        if (!is_user_connected(attacker))
        {
            return 0;
        }
        message_begin(MSG_BROADCAST, g_msgScoreInfo, 248, 0);
        write_byte(attacker);
        write_short(pev(attacker, pev_frags));
        write_short(fm_get_user_deaths(attacker));
        write_short(0);
        write_short(fm_cs_get_user_team(attacker));
        message_end();
        if (!is_user_connected(victim))
        {
            return 0;
        }
        message_begin(MSG_BROADCAST, g_msgScoreInfo, 248, 0);
        write_byte(victim);
        write_short(pev(victim, pev_frags));
        write_short(fm_get_user_deaths(victim));
        write_short(0);
        write_short(fm_cs_get_user_team(victim));
        message_end();
    }
    return 0;
}

FixDeadAttrib(id)
{
    message_begin(MSG_BROADCAST, g_msgScoreAttrib, 248, 0);
    write_byte(id);
    write_byte(0);
    message_end();
    return 0;
}

SendDeathMsg(attacker, victim)
{
    message_begin(MSG_BROADCAST, g_msgDeathMsg, 248, 0);
    write_byte(attacker);
    write_byte(victim);
    write_byte(0);
    write_string("knife");
    message_end();
    return 0;
}

SendDeathMsg2(attacker, victim)
{
    message_begin(MSG_BROADCAST, g_msgDeathMsg, 248, 0);
    write_byte(attacker);
    write_byte(victim);
    write_byte(0);
    write_string("fall");
    message_end();
    return 0;
}

fm_cs_set_user_deaths(id, value)
{
    set_pdata_int(id, 444, value, 5);
    return 0;
}

fm_get_user_deaths(id)
{
    return get_pdata_int(id, 444, 5);
}

fm_cs_get_user_team(id)
{
    return get_pdata_int(id, 114, 5);
}

public play_sound(String:sound[])
{
    new players[32];
    new pnum = 0;
    get_players(players, pnum, "c", "");
    new i = 0;
    i = 0;
    while (i < pnum)
    {
        if (!(is_user_connecting(players[i])))
        {
            client_cmd(players[i], "spk %s", sound);
        }
        i++;
    }
    return 0;
}

public native_get_user_killer(victim, attacker)
{
    new var1 = attacker;
    g_izKilled[victim][0][0][0] = var1;
    return var1;
}

public native_get_user_rank(id)
{
    return GetPosition(id);
}

public SortTask()
{
    if (!g_Sort)
    {
        return 0;
    }
    new var1 = Heap_4;
    var1[0] = 20636;
    ArraySort(g_SteamID, "SortRanks", var1, 0);
    WriteTop15();
    SaveRanks();
    return 0;
}

public SortRanks(Array:SteamID, Position1, Position2)
{
    static SteamID1[32];
    ArrayGetString(SteamID, Position1, SteamID1, 31);
    static SteamID2[32];
    ArrayGetString(SteamID, Position2, SteamID2, 31);
    static Kills1;
    TrieGetCell(g_Kills, "", Kills1);
    static Kills2;
    TrieGetCell(g_Kills, "", Kills2);
    static Deaths1;
    TrieGetCell(g_Deaths, "", Deaths1);
    static Deaths2;
    TrieGetCell(g_Deaths, "", Deaths2);
    if (Kills2 - Deaths2 > Kills1 - Deaths1)
    {
        return 1;
    }
    if (Kills2 - Deaths2 < Kills1 - Deaths1)
    {
        return -1;
    }
    return 0;
}

LoadRanks()
{
    new File = fopen("", "r");
    if (!File)
    {
        return 0;
    }
    new Data[96];
    new SteamID[32];
    new Name[32];
    new Kills[16];
    new Deaths[16];
    while (!feof(File))
    {
        fgets(File, Data, 96);
        replace_all(Data, 95, "\n", "");
        if (!strlen(Data))
        {
        }
        else
        {
            parse(Data, SteamID, 31, Name, 31, Kills, 15, Deaths, 15);
            ArrayPushString(g_SteamID, SteamID);
            TrieSetString(g_Name, SteamID, Name);
            TrieSetCell(g_Kills, SteamID, str_to_num(Kills));
            TrieSetCell(g_Deaths, SteamID, str_to_num(Deaths));
        }
    }
    fclose(File);
    return 0;
}

SaveRanks()
{
    !!! Removed Phi
    new File = fopen("", "w+");
    if (!File)
    {
        return 0;
    }
    new Position = 0;
    new Size = ArraySize(g_SteamID);
    new SteamID[32];
    new Name[32];
    new Kills = 0;
    new Deaths = 0;
    while (Position < Size)
    {
        ArrayGetString(g_SteamID, Position, SteamID, 31);
        if (!(5 > strlen(SteamID)))
        {
            TrieGetString(g_Name, SteamID, Name, 31);
            TrieGetCell(g_Kills, SteamID, Kills);
            TrieGetCell(g_Deaths, SteamID, Deaths);
            fprintf(File, "\n%s \"%s\" %d %d", SteamID, Name, Kills, Deaths);
        }
        Position++;
    }
    fclose(File);
    return 0;
}

AddRank(Client)
{
    g_Data[Client][0][0][64] = 0;
    g_Data[Client][0][0][65] = 0;
    ArrayPushString(g_SteamID, g_Data[Client][0][0]);
    TrieSetString(g_Name, g_Data[Client][0][0], g_Data[Client][0][0][32]);
    return 0;
}

LoadData(Client)
{
    TrieGetCell(g_Kills, g_Data[Client][0][0], g_Data[Client][0][0][64]);
    TrieGetCell(g_Deaths, g_Data[Client][0][0], g_Data[Client][0][0][65]);
    return 0;
}

UpdateRank(Client, bool:Name)
{
    if (Name)
    {
        TrieSetString(g_Name, g_Data[Client][0][0], g_Data[Client][0][0][32]);
    }
    TrieSetCell(g_Kills, g_Data[Client][0][0], g_Data[Client][0][0][64]);
    TrieSetCell(g_Deaths, g_Data[Client][0][0], g_Data[Client][0][0][65]);
    return 0;
}

GetPosition(Client)
{
    static SteamID[32];
    static Size;
    static Position;
    Position = 0;
    Size = ArraySize(g_SteamID);
    while (Position < Size)
    {
        ArrayGetString(g_SteamID, Position, SteamID, 31);
        if (equal("", g_Data[Client][0][0], 0))
        {
            return Position + 1;
        }
        Position += 1;
    }
    return 0;
}

WriteTop15()
{
    static Header[94] =
    {
        60, 109, 101, 116, 97, 32, 99, 104, 97, 114, 115, 101, 116, 61, 85, 84, 70, 45, 56, 62, 60, 98, 111, 100, 121, 32, 98, 103, 99, 111, 108, 111, 114, 61, 35, 48, 48, 48, 48, 48, 48, 62, 60, 102, 111, 110, 116, 32, 99, 111, 108, 111, 114, 61, 35, 70, 70, 66, 48, 48, 48, 62, 60, 112, 114, 101, 62, 37, 53, 115, 32, 32, 37, 50, 50, 115, 32, 32, 37, 53, 115, 32, 32, 37, 53, 115, 32, 32, 37, 53, 115, 10, 10, 0
    }
    static Buffer[31] =
    {
        37, 52, 100, 32, 32, 32, 37, 50, 50, 115, 32, 32, 37, 54, 100, 32, 32, 37, 53, 100, 32, 32, 37, 48, 46, 49, 102, 37, 37, 10, 0
    }
    static Deaths;
    static Kills;
    static Name[32];
    static SteamID[32];
    static Size;
    static Position;
    static Length;
    Length = formatex(g_Top15[Length], 2047 - Length, Header, "Rank", "Name", "Kills", "Deaths", "Percent");
    Position = 0;
    Size = min(ArraySize(g_SteamID), 15);
    while (Position < Size)
    {
        ArrayGetString(g_SteamID, Position, SteamID, 31);
        TrieGetString(g_Name, "", Name, 31);
        TrieGetCell(g_Kills, "", Kills);
        TrieGetCell(g_Deaths, "", Deaths);
        Length = formatex(g_Top15[Length], 2047 - Length, Buffer, Position + 1, Name, Kills, Deaths, 100.00/*1120403456*/ * Kills / Deaths + Kills) + Length;
        Position += 1;
    }
    return 0;
}
Is this the source code? It seems that it can't be compiled
Все одним и тем-же декомпилятором пользуются, который КряВо работает)
:D
 
Последнее редактирование:

perfectblood0

Команда форума
Администратор
Регистрация
29 Окт 2017
Сообщения
2.182
Симпатии
750

Shadowless

Пользователь
Регистрация
24 Фев 2019
Сообщения
217
Симпатии
7
Пол
Мужской
Сверху Снизу