Modificare plugin decompilat

Tutoriale scripting, cod si portiuni de cod.

Moderators: Moderatori ajutatori, Moderatori

Post Reply
User avatar
NemeSyS17
Membru, skill +1
Membru, skill +1
Posts: 258
Joined: 04 Apr 2017, 23:42
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Has thanked: 5 times
Been thanked: 1 time
Contact:

31 Jul 2019, 23:07

Salut, deci am decompilat un .amxx! cu programu lysis parca! va las decompilare aici!
si daca se poate sa se scoata reclamele cu [FURIEN]
si cand scriu in say_team, apare anti furien si furien!

Code: Select all

#pragma semicolon 1
#pragma ctrlchar '\'

new Values[10][0];
new Float:Position[3][0];
new Float:Flooding[33];
new Flood[33];
new MessageChannel;
new HUDEVENT1;
new bool:BlockedChat;
new bool:BombPlanted;
new Restart;
new cvar_restrict;
new TAGFile[128];
new bool:HaveTAG[33];
new PlayerTAG[33][33];
new TeamName[4][] =
{
    "",
    "TERRORIST",
    "CT",
    "SPECTATOR"
};

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


cmd_access(id, level, cid, num, bool:accesssilent)
{
    !!! Removed Phi
    new has_access = 0;
    new var1;
    if (is_dedicated_server())
    {
        var1 = 0;
    }
    else
    {
        var1 = 1;
    }
    if (var1 == id)
    {
        has_access = 1;
    }
    else
    {
        if (level == 16777216)
        {
            if (is_user_admin(id))
            {
                has_access = 1;
            }
        }
        if (level & get_user_flags(id, 0))
        {
            has_access = 1;
        }
        if (level)
        {
        }
        else
        {
            has_access = 1;
        }
    }
    if (has_access)
    {
        if (num > read_argc())
        {
            new hcmd[32];
            new hinfo[128];
            new hflag = 0;
            get_concmd(cid, hcmd, 31, hflag, hinfo, 127, level, -1);
            console_print(id, "%L:  %s %s", id, "USAGE", hcmd, hinfo);
            return 0;
        }
        return 1;
    }
    if (!accesssilent)
    {
        console_print(id, "%L", id, "NO_ACC_COM");
    }
    return 0;
}

access(id, level)
{
    if (level == 16777216)
    {
        return is_user_admin(id);
    }
    if (level)
    {
        return level & get_user_flags(id, 0);
    }
    return 1;
}

cmd_target(id, String:arg[], flags)
{
    !!! Removed Phi
    new player = find_player("bl", arg);
    if (player)
    {
        if (find_player("blj", arg) != player)
        {
            console_print(id, "%L", id, "MORE_CL_MATCHT");
            return 0;
        }
    }
    else
    {
        if (var4 && arg[0] == 35 && arg[1])
        {
            player = find_player("k", str_to_num(arg[1]));
        }
    }
    if (!player)
    {
        console_print(id, "%L", id, "CL_NOT_FOUND");
        return 0;
    }
    if (flags & 1)
    {
        if (get_user_flags(player, 0) & 1 && flags & 2)
        {
            new imname[32];
            get_user_name(player, imname, 31);
            console_print(id, "%L", id, "CLIENT_IMM", imname);
            return 0;
        }
    }
    if (flags & 4)
    {
        if (!is_user_alive(player))
        {
            new imname[32];
            get_user_name(player, imname, 31);
            console_print(id, "%L", id, "CANT_PERF_DEAD", imname);
            return 0;
        }
    }
    if (flags & 8)
    {
        if (is_user_bot(player))
        {
            new imname[32];
            get_user_name(player, imname, 31);
            console_print(id, "%L", id, "CANT_PERF_BOT", imname);
            return 0;
        }
    }
    return player;
}

get_basedir(String:name[], len)
{
    return get_localinfo("amxx_basedir", name, len);
}

get_configsdir(String:name[], len)
{
    return get_localinfo("amxx_configsdir", 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;
}

public plugin_init()
{
    register_plugin("Chat/Hud", "4.0", "Aragon*");
    register_concmd("amx_say", "CmdSay", 256, "<message> - sends message to all players", -1);
    register_concmd("amx_psay", "CmdPrivateSay", 256, "<name or #userid> <message> - sends private message", -1);
    register_clcmd("amx_reloadtags", "RELOADTAGS", -1, "", -1);
    register_clcmd("say", "Say", -1, "", -1);
    register_clcmd("say_team", "SayTeam", -1, "", -1);
    cvar_restrict = register_cvar("furien_restrict_chat", "1", 0, 0.00);
    register_logevent("AutoRestart", 2, "1=Round_End");
    register_event("HLTV", "EVENT_NewRound", "a", "1=0", "2=0");
    register_forward(FM_ClientUserInfoChanged, "FWD_ChangeName", 0);
    HUDEVENT1 = CreateHudSyncObj(0);
    BlockedChat = 1;
    return 0;
}

public plugin_natives()
{
    register_native("get_user_tag", "get_user_tag", 1);
    return 0;
}

public plugin_precache()
{
    get_configsdir(TAGFile, 127);
    formatex(TAGFile, 127, "%s/PlayerTags.ini", TAGFile);
    if (!file_exists(TAGFile))
    {
        write_file(TAGFile, ";Aici treceti tag-urile jucatorilor !", -1);
        write_file(TAGFile, ";ex: \"Nume Player\" \"Tag Player\" ", -1);
        write_file(TAGFile, ";Numele sa fie exact(ex: DaNNe. va fi DaNNe. nu danne. !)", -1);
    }
    return 0;
}

public EVENT_NewRound()
{
    if (get_pcvar_num(cvar_restrict))
    {
        BombPlanted = 0;
    }
    return 0;
}

public AutoRestart(id)
{
    Restart += 1;
    if (Restart == 2)
    {
        server_cmd("sv_restart 1");
        ColorChat(id, COLOR:2, "\4[FURIEN]\1 Runda de incalzire s-a terminat.");
        ColorChat(id, COLOR:2, "\4[FURIEN]\1 Se poate folosi din nou\3 CHAT-ul\1.");
        BlockedChat = 0;
    }
    return 0;
}

public RELOADTAGS(id)
{
    !!! Removed Phi
    if (is_user_connected(id) && get_user_flags(id, 0) & 1)
    {
        new Players[32];
        new Num = 0;
        get_players(Players, Num, "c", "");
        new i = 0;
        while (i < Num)
        {
            if (is_user_connected(Players[i]))
            {
                set_task(0.10, "LoadTag", Players[i], "", 0, "", 0);
                i++;
            }
            i++;
        }
    }
    return 0;
}

public client_putinserver(id)
{
    LoadTag(id);
    return 0;
}

public bomb_planted(planter)
{
    !!! Removed Phi
    if (get_pcvar_num(cvar_restrict))
    {
        BombPlanted = 1;
    }
    return 0;
}

public bomb_defused(defuser)
{
    if (get_pcvar_num(cvar_restrict))
    {
        BombPlanted = 0;
    }
    return 0;
}

public FWD_ChangeName(id, buffer)
{
    if (!is_user_connected(id))
    {
        return 1;
    }
    static Val[32];
    static Name[32];
    get_user_name(id, Name, 31);
    engfunc(EngFunc_InfoKeyValue, buffer, "name", Val, 31);
    if (equal("", "", 0))
    {
        return 1;
    }
    HaveTAG[id] = 0;
    set_task(0.10, "LoadTag", id, "", 0, "", 0);
    return 4;
}

public CmdSay(id, level, cid)
{
    if (cmd_access(id, level, cid, 2, false))
    {
        new Message[192];
        new Nick[32];
        read_args(Message, 191);
        remove_quotes(Message);
        get_user_name(id, Nick, 31);
        ColorChat(0, COLOR:2, "(ALL)\3%s\1:\4 %s", Nick, Message);
        log_chat("Admin %s says all(amx_say): \"%s\"", Nick, Message);
    }
    return 0;
}

public CmdPrivateSay(id, level, cid)
{
    !!! Removed Phi
    if (cmd_access(id, level, cid, 3, false))
    {
        new Nick[32];
        read_argv(1, Nick, 31);
        new Target = cmd_target(id, Nick, 0);
        if (Target)
        {
            if (Message[0] == 34 && Message[Length] == 34)
            {
                Message[0] = 32;
                Message[Length] = 32;
                Length += 2;
            }
            remove_quotes(Message[Length]);
            if (Target != id)
            {
                ColorChat(id, COLOR:2, "(%s)\3 %s\4 :\1 %s", Nick, TargetName, Message[Length]);
                ColorChat(Target, COLOR:2, "(%s)\3 %s\4 :\1 %s", Nick, TargetName, Message[Length]);
                log_chat("Admin %s says to %s(amx_psay): \"%s\"", Nick, TargetName, Message[Length]);
            }
        }
    }
    return 0;
}


/ * ERROR! control flow graph is not reducible * /
 function "Say"
public Say(id)


/ * ERROR! control flow graph is not reducible * /
 function "SayTeam"
public SayTeam(id)

ColorChat(id, COLOR:type, String:msg[])
{
    !!! Removed Phi
    new Message[252];
    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] = 10180;
    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, 15880, 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, 15880, 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 get_user_tag(id)
{
    new var1;
    if (HaveTAG[id][0][0])
    {
        var1 = 1;
    }
    else
    {
        var1 = 0;
    }

/ * ERROR! Unable to cast object of type 'Lysis.DSentinel' to type 'Lysis.DReturn'. * /
 function "get_user_tag"
public get_user_tag(id)

public have_user_tag(id)
{
    new var1 = PlayerTAG[id][0][0];

/ * ERROR! Object reference not set to an instance of an object. * /
 function "have_user_tag"
public have_user_tag(id)

public LoadTag(id)
{
    !!! Removed Phi
    HaveTAG[id] = 0;
    if (!file_exists(TAGFile))
    {
        write_file(TAGFile, ";Aici treceti tag-urile jucatorilor.", -1);
        write_file(TAGFile, ";Numele sa fie exact (ex: DaNNe. va fi DaNNe. nu danne.)", -1);
        write_file(TAGFile, "\"Nume Player\" \"Tag Player\" ", -1);
    }
    new File = fopen("", "rt");
    new Data[1024];
    new BUFFER[2][33];
    BUFFER[0] = 16436;
    new BUFFERLen = 32;
    while (!feof(File))
    {
        if (!Data[0] || Data[0] == 59 || (Data[0] == 47 && Data[1] == 47))
        {
        }
    }
    return 0;
}

log_chat(String:LogMessage[])
{
    static Directory[64];
    static FileName[96];
    static Message[256];
    vformat(Message, 255, LogMessage, 2);
    if (!Directory[0][0])
    {
        get_basedir(Directory, 63);
        add("", 63, "/logs", 0);
    }
    format_time(FileName, 95, "%d.%m.%Y", -1);
    format(FileName, 95, "%s/FURIENCHAT_%s.log", Directory, FileName);
    log_to_file(FileName, "%s", Message);
    return 0;
}

DETINATOR : CS.RULS.RO *JOIN*
eXtreamSHOP
User avatar
Laurentiu P.
Super moderator
Super moderator
Posts: 2196
Joined: 10 Jul 2013, 20:26
Detinator Steam: Da
CS Status: Activitate scazuta !
Detinator server CS: Da
SteamID: trust_ro
Reputatie: Moderator > Super moderator
Nume anterior: Do[N]e ;3
Fond eXtream: 1
Location: Constanta
Has thanked: 4 times
Been thanked: 15 times

05 Aug 2019, 21:09

Mai bine ma impusc decat sa refac acel plugin. L-ai decompilat tu, insa nu e complet.
Image
User avatar
DevilBoy.eXe
Moderator ajutator
Moderator ajutator
Posts: 1257
Joined: 05 Jun 2016, 22:04
Detinator Steam: Da
Detinator server CS: GO.WARED.RO
SteamID: DevilBoy_eXe
Reputatie: Moderator ajutator
Fond eXtream: -1
Location: beyond the time
Has thanked: 4 times
Been thanked: 2 times
Contact:

05 Aug 2019, 21:26

Mai bine ne spui ce fel de plugin e sau cum se numeste si iti cautam sursa
@IONUTZ
Membru, skill +1
Membru, skill +1
Posts: 174
Joined: 17 Dec 2017, 23:11
Detinator Steam: Da
Fond eXtream: 0
Has thanked: 1 time
Been thanked: 2 times

05 Aug 2019, 21:50

DevilBoy.eXe wrote:
05 Aug 2019, 21:26
Mai bine ne spui ce fel de plugin e sau cum se numeste si iti cautam sursa
Daca te uitai la pluginu decompilat vedeai cum se numeste.

Code: Select all

register_plugin("Chat/Hud", "4.0", "Aragon*");
User avatar
DevilBoy.eXe
Moderator ajutator
Moderator ajutator
Posts: 1257
Joined: 05 Jun 2016, 22:04
Detinator Steam: Da
Detinator server CS: GO.WARED.RO
SteamID: DevilBoy_eXe
Reputatie: Moderator ajutator
Fond eXtream: -1
Location: beyond the time
Has thanked: 4 times
Been thanked: 2 times
Contact:

05 Aug 2019, 22:13

@IONUTZ wrote:
05 Aug 2019, 21:50
DevilBoy.eXe wrote:
05 Aug 2019, 21:26
Mai bine ne spui ce fel de plugin e sau cum se numeste si iti cautam sursa
Daca te uitai la pluginu decompilat vedeai cum se numeste.

Code: Select all

register_plugin("Chat/Hud", "4.0", "Aragon*");
Nu nu m-am uitat deloc oricum parca am cumpărat eu de la aragon furien dar nu mai știu ce vers poate îți postez sursa daca o gasesc
Post Reply

Return to “Scripting”

  • Information