ABD with names

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Аватар
sanimare
Извън линия
Foreigner
Foreigner
Мнения: 3
Регистриран на: 02 Фев 2018, 03:21
Се отблагодари: 1 път

ABD with names

Мнение от sanimare » 19 Яну 2020, 14:31

Issue: Doesn't show hud at all.
I tried changing VIP_ACCESS flags but didn't help, even tried /dmgnames in server many times.
I want this to work for everyone and ofcourse showing in hud damage done.

AMX Mod X 1.9.0.5263
ReAPI: v5.12.0.192-dev
ReGameDLL: 5.13.0.447-dev+m

I updated regamedll because there was error:
[ReAPI] RegisterHookChain: function (CBasePlayer_TakeDamage) is not available, ReGameDLL required.
[AMXX] Run time error 10 (plugin "abd_2020.amxx") (native "RegisterHookChain") - debug not enabled!

Now i don't have errors, but still no hud message.
I set #define VIP_ACCESS ADMIN_ALL
No results. Help, thanks.

Код за потвърждение: Избери целия код

Removed by author request

Аватар
mi0
Извън линия
AMXX Скриптър
AMXX Скриптър
Мнения: 534
Регистриран на: 09 Дек 2016, 22:02
Се отблагодари: 97 пъти
Получена благодарност: 120 пъти
Обратна връзка:

ABD with names

Мнение от mi0 » 19 Яну 2020, 16:08

There are some issues in the newer versions of ReAPI or ReGameDLL(I'm not sure which). If you have updated ReGameDLL recently get it down with several builds and look if it changes the situates. Same applies to ReAPI.
aka kurdokoleno
Catch Mod - 87.121.112.232:27021

Аватар
sanimare
Извън линия
Foreigner
Foreigner
Мнения: 3
Регистриран на: 02 Фев 2018, 03:21
Се отблагодари: 1 път

ABD with names

Мнение от sanimare » 19 Яну 2020, 20:51

Same, nothing showing up.. i tried regamedll-5.9.0.387-dev and reapi_5.11.0.190-dev.

Added in 2 hours 51 minutes 7 seconds:
Tried every version from here: http://teamcity.rehlds.org/viewType.htm ... eStatusDiv
Also i compiled with 1.9 and i added from every ReAPI version the include folder and compiled again plugin. Still nothing appears on screen.
I also tried ReGameDLL versions, some of them...

Код за потвърждение: Избери целия код

 [  1] AMX Mod X, v1.9.0.5263, Oct 27 2019, by AMX Mod X Dev Team, see http://www.amxmodx.org
 [  2] WHBlocker, v1.5.696, 2018-11-04, by s1lent, see http://www.aghl.ru/
 [  3] Reunion, v0.1.0.92c, 2019-07-25, by The Legion, see 
 [  4] ReAuthCheck, v0.1.6, 2017-03-08, by Adidasman, see http://www.dedicated-server.ru/
 [  5] ReSemiclip, v2.3.9, 13/02/17, by s1lent & Adidasman, see http://www.dedicated-server.ru/
 [  6] Revoice, v0.1.0.31, 2017-10-26, by The Legion, see 
 [  7] SafeNameAndChat, v1.1, 2017.02.01, by WPMG.PRoSToC0der, see http://snac.wpmg.ru/
 [  8] MySQL, v1.9.0.5263, Sep 10 2018, by AMX Mod X Dev Team, see http://www.amxmodx.org/
 [  9] Fun, v1.9.0.5263, Sep 10 2018, by AMX Mod X Dev Team, see http://www.amxmodx.org
 [ 10] Engine, v1.9.0.5263, Sep 10 2018, by AMX Mod X Dev Team, see http://www.amxmodx.org
 [ 11] FakeMeta, v1.9.0.5263, Sep 10 2018, by AMX Mod X Dev Team, see http://www.amxmodx.org
 [ 12] CStrike, v1.9.0.5263, Sep 10 2018, by AMX Mod X Dev Team, see http://www.amxmodx.org
 [ 13] CSX, v1.9.0.5263, Sep 10 2018, by AMX Mod X Dev Team, see http://www.amxmodx.org/
 [ 14] Ham Sandwich, v1.9.0.5263, Sep 10 2018, by AMX Mod X Dev Team, see http://www.amxmodx.org
 [ 15] ReAPI, v5.12.0.192-dev, 2019-12-14, by Asmodai & s1lent, see https://github.com/s1lentq/reapi/
 [ 16] ReAimDetector, v0.2.2, 2018-02-06, by ReHLDS Team, see http://www.dedicated-server.ru/
 [ 17] hackdetector, v0.15.328.lite, 2016-12-17, by AGHL.RU Dev Team, see http://www.aghl.ru/
 [ 18] GeoIP, v1.9.0.5263, Oct 20 2019, by AMX Mod X Dev Team, see http://www.amxmodx.org/
 [ 19] SQLite, v1.9.0.5263, Sep 10 2018, by AMX Mod X Dev Team, see http://www.amxmodx.org/
 [ 20] gRIP, v0.1.5 Beta, Jul 13 2019, by Inline, see https://github.com/in-line/grip
20 plugins

Аватар
sanimare
Извън линия
Foreigner
Foreigner
Мнения: 3
Регистриран на: 02 Фев 2018, 03:21
Се отблагодари: 1 път

ABD with names

Мнение от sanimare » 27 Яну 2020, 02:16

I managed to fix, by deleting all about VIP, but i deleted more things i think i don't know how to fix.
For example /dmg command is not working and maybe i messed up something more, if you guys can try to fix it.

Код за потвърждение: Избери целия код

Removed By Author Request
I would like to merge with this plugin so with /damager i can set up everything possible from first plugin in second, because in second i have block showing damage through walls, and in first one i don't.

Код за потвърждение: Избери целия код

#include <amxmodx>
#include <reapi>
#include <nvault_array>
#include <hamsandwich>

#if AMXX_VERSION_NUM < 183
    #include <dhudmessage>
#endif 

/**         Settings        **/

#define VISIBILITY_THROUGH_WALLS 2
/* comment out if you want that players saw a loss through walls
* 1 - Players can select to see a loss through walls or not
* 2 - Players cannot select. They will not see a loss through walls
*/
#define AUTO_RESET_INACTIVE_USERS 30
/*
* 30 - days through how many to execute reset
* comment out if you want to switch off this function
*/

//#define sFlags "abc"
/*
* comment out if you want to switch off this function
*/

new const g_szColors[][] =
{
    { 255, 228, 181 },
    { 30, 144, 255 },
    { 255, 255, 0 },
    { 50, 205, 50 },
    { 144, 238, 144 }
}

new const Float: g_szCoords[][] =
{
    { 0.50, 0.40 },
    { 0.56, 0.44 },
    { 0.60, 0.50 },
    { 0.56, 0.56 },
    { 0.50, 0.60 },
    { 0.44, 0.56 },
    { 0.40, 0.50 },
    { 0.44, 0.44 }
}

/**         Settings        **/

#if !defined MAX_PLAYERS
    const MAX_PLAYERS = 32;
#endif

#if !defined MAX_AUTHID_LENGTH
    const MAX_AUTHID_LENGTH = 64;
#endif

new const PLUGIN_NAME[] = "Damager";
new const PLUGIN_VERSION[] = "0.0.6";

enum _:eData
{
    STATE,
    STYLE,
    TYPE,
    INCOMING,
#if defined VISIBILITY_THROUGH_WALLS 
    #if VISIBILITY_THROUGH_WALLS == 1
    VISIBLE,
    #endif
#endif
    POSITION,
    AUTHID[MAX_AUTHID_LENGTH]
} new g_iDamagerData[MAX_PLAYERS+1][eData];

enum _:eState
{
    DISABLE = 0,
    ENABLE
}

enum _:eStyle
{
    NUMBERS = 0,
    STARS
}

enum _:eType
{
    DEFAULT = 0,
    CIRCLE
}
#if defined VISIBILITY_THROUGH_WALLS
    #if VISIBILITY_THROUGH_WALLS == 1
        enum _:eVisible
        {
            INVISIBLE = 0,
            VISIBLE
        }
    #endif
#endif

new g_HudSyncMessage;
new g_HudSyncMessage2;

#if defined VISIBILITY_THROUGH_WALLS
    #if VISIBILITY_THROUGH_WALLS == 1
        const MENU_KEYS = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5|MENU_KEY_0;
    #else
        const MENU_KEYS = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_0;
    #endif
#else
    const MENU_KEYS = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_0;
#endif

new g_hVault;
#if defined VISIBILITY_THROUGH_WALLS
    #if VISIBILITY_THROUGH_WALLS == 1
        new const VAULT_FILE[] = "damager4";
    #else
        new const VAULT_FILE[] = "damager5";
    #endif
#else
    new const VAULT_FILE[] = "damager5";
#endif

#define IsBot(%1) (!g_iDamagerData[%1][AUTHID][0])

public plugin_init()
{
    register_plugin(PLUGIN_NAME, PLUGIN_VERSION, "steelzzz");

    register_cvar("damager_version", PLUGIN_VERSION, FCVAR_SERVER | FCVAR_SPONLY); // spy

    register_clcmd("say /damager", "Command_ShowDmgMenu");

    register_menucmd(register_menuid("Command_ShowDmgMenu"), MENU_KEYS, "DmgMenu_Handler");

    RegisterHookChain(RG_CBasePlayer_TakeDamage, "CPlayer_TakeDamage_Post", .post = true);

    g_HudSyncMessage = CreateHudSyncObj();
    g_HudSyncMessage2 = CreateHudSyncObj();
    g_hVault = nvault_open(VAULT_FILE);

    if(g_hVault == INVALID_HANDLE)
    {
        set_fail_state("[!] Opening nVault failed!");
    }
#if defined AUTO_RESET_INACTIVE_USERS
    else
    {
        nvault_prune(g_hVault, 0, get_systime() - (86400 * AUTO_RESET_INACTIVE_USERS));
    }
#endif

    register_dictionary("damager.txt");
}
public plugin_end()
{
    if(g_hVault != INVALID_HANDLE)
    {
        nvault_close(g_hVault);
    }
}

public client_authorized(iPlayer)
{
    nVaultSaveData(iPlayer);
}

public client_putinserver(iPlayer)
{
    g_iDamagerData[iPlayer][AUTHID][0] = 0;

    if(is_user_bot(iPlayer) || is_user_hltv(iPlayer))
    {
        return;
    }

    get_user_authid(iPlayer, g_iDamagerData[iPlayer][AUTHID], MAX_AUTHID_LENGTH - 1);

    if(nvault_get_array(g_hVault, g_iDamagerData[iPlayer][AUTHID], g_iDamagerData[iPlayer], eData) <= 0)
    {
        g_iDamagerData[iPlayer][STATE] = ENABLE;
        g_iDamagerData[iPlayer][STYLE] = NUMBERS;
#if defined VISIBILITY_THROUGH_WALLS
    #if VISIBILITY_THROUGH_WALLS == 1
        g_iDamagerData[iPlayer][VISIBLE] = VISIBLE;
    #endif
#endif
        g_iDamagerData[iPlayer][TYPE] = DEFAULT;
        g_iDamagerData[iPlayer][INCOMING] = DISABLE;
    }
}

public Command_ShowDmgMenu(iPlayer)
{
#if defined sFlags
    if(!(get_user_flags(iPlayer) & read_flags(sFlags)))
    {
        return PLUGIN_HANDLED;
    }
#endif

    new szMenu[512];
    new iLen;
    
    iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L^n^n", iPlayer, "MENU_TITLE");

    iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L^n", iPlayer, "MENU_ITEM1", iPlayer, g_iDamagerData[iPlayer][STATE] ? "ENABLED" : "DISABLED");
    iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L^n", iPlayer, "MENU_ITEM2", iPlayer, g_iDamagerData[iPlayer][STYLE] ? "STARS" : "NUMBERS");
    iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L^n", iPlayer, "MENU_ITEM3", iPlayer, g_iDamagerData[iPlayer][TYPE] ? "CIRCLE" : "DEFAULT");
    iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L^n", iPlayer, "MENU_ITEM4", iPlayer, g_iDamagerData[iPlayer][INCOMING] ? "ENABLED" : "DISABLED");
#if defined VISIBILITY_THROUGH_WALLS
    #if VISIBILITY_THROUGH_WALLS == 1
        iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "%L^n", iPlayer, "MENU_ITEM5", iPlayer, g_iDamagerData[iPlayer][VISIBLE] ? "ENABLED" : "DISABLED");
    #endif
#endif
    formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n%L", iPlayer, "MENU_EXIT");

#if AMXX_VERSION_NUM < 183
	set_member(iPlayer, m_iMenu, Menu_OFF);
#endif
    show_menu(iPlayer, MENU_KEYS, szMenu, -1, "Command_ShowDmgMenu");

    return PLUGIN_CONTINUE;
}

public DmgMenu_Handler(iPlayer, iKey)
{
    if(iKey == 9)
    {
        nVaultSaveData(iPlayer);
        return PLUGIN_HANDLED;
    }

#if defined VISIBILITY_THROUGH_WALLS
    #if VISIBILITY_THROUGH_WALLS == 1
        new const iPtr[] = {STATE, STYLE, TYPE, INCOMING, VISIBLE};
    #else
        new const iPtr[] = {STATE, STYLE, TYPE, INCOMING};
    #endif
#else
    new const iPtr[] = {STATE, STYLE, TYPE, INCOMING};
#endif
    iKey = iPtr[iKey];

    g_iDamagerData[iPlayer][iKey] = !g_iDamagerData[iPlayer][iKey];
    Command_ShowDmgMenu(iPlayer);

    return PLUGIN_HANDLED;
}

public CPlayer_TakeDamage_Post(iVictim, iInflictor, iAttacker, Float:flDamage, iBitsDamageType)
{
    if(!is_user_connected(iAttacker) || flDamage <= 1.0 || !rg_is_player_can_takedamage(iVictim, iAttacker) || iVictim == iAttacker)
    {
        return;
    }

#if defined sFlags
    if(!(get_user_flags(iAttacker) & read_flags(sFlags)))
    {
        return;
    }
#endif

    if(iBitsDamageType & DMG_BLAST)
    {
        return;
    }

#if defined VISIBILITY_THROUGH_WALLS
    #if VISIBILITY_THROUGH_WALLS == 1
    if(!g_iDamagerData[iAttacker][STATE] || (!g_iDamagerData[iAttacker][VISIBLE] && !ExecuteHam(Ham_FVisible, iAttacker, iVictim)))
    #elseif VISIBILITY_THROUGH_WALLS == 2
    if(!g_iDamagerData[iAttacker][STATE] || (!ExecuteHam(Ham_FVisible, iAttacker, iVictim)))
    #endif
#else
    if(!g_iDamagerData[iAttacker][STATE])
#endif
    {
        return;       
    }

    new iColor = random_num(0, charsmax(g_szColors));

    if(g_iDamagerData[iAttacker][TYPE])
    {
        new iPos = ++g_iDamagerData[iAttacker][POSITION];

        if(iPos == sizeof(g_szCoords))
        {
            iPos = g_iDamagerData[iAttacker][POSITION] = 0;
        }

        if(g_iDamagerData[iVictim][INCOMING])
        {
            set_dhudmessage(255, 0, 0, g_szCoords[iPos][0], g_szCoords[iPos][1]+0.06, 0, 0.1, 0.5, 0.02, 0.02);
            ShowSyncHudMsg(iVictim, g_HudSyncMessage2, (g_iDamagerData[iVictim][STYLE]) ? "*" : "%.0f", flDamage);
        }
        set_hudmessage(0, 100, 200, g_szCoords[iPos][0], g_szCoords[iPos][1], 0, 0.1, 1.5, 0.02, 0.02, -1);
    }
    else
    {
        if(g_iDamagerData[iVictim][INCOMING])
        {
            set_dhudmessage(255, 0, 0, -1.0, 0.45, 2, 0.1, 0.5, 0.02, 0.02);
            ShowSyncHudMsg(iVictim, g_HudSyncMessage2, (g_iDamagerData[iVictim][STYLE]) ? "*" : "%.0f", flDamage);
        }
        set_hudmessage(0, 255, 0, -1.0, 0.55, 2, 0.1, 0.5, 0.02, 0.02, -1);
    }

    ShowSyncHudMsg(iAttacker, g_HudSyncMessage, (g_iDamagerData[iAttacker][STYLE]) ? "*" : "%.0f", flDamage);
}

public nVaultSaveData(iPlayer)
{
    if(!IsBot(iPlayer))
    {
        nvault_set_array(g_hVault, g_iDamagerData[iPlayer][AUTHID], g_iDamagerData[iPlayer], eData);
    }
}

Публикувай отговор

Обратно към “Заявки за плъгини”

Кой е на линия

Потребители разглеждащи този форум: Bing [Bot] и 21 госта