Добрый вечер, проблема с зомби классом Healer c WeaponListom

Сообщения
13
Реакции
0
Ошибка
Ошибка в том, что не упонлист не сбрасываться, в новым раунде. Играешь за любого зомби класса. который имеет свои уполист. Пример в скрине. Есть возможности как это исправить??
ОС
Windows
Amx Mod X
AMX Mod X 1.10.0.5406 (http://www.amxmodx.org)
Билд
Exe version 1.6.3.7/Stdio (cstrike)
ReHLDS version: 3.7.0.698-dev
Build date: 10:14:22 Aug 19 2020 (2321)
ReGamedll
ReGameDLL version: 5.18.0.480-dev
Build date: 19:19:50 Nov 21 2020
Версия Metamod
Metamod-r v1.3.0.128, API (5:13)
Metamod-r build: 15:47:38 Aug 24 2018
Список метамодулей
description   stat pend  file                  vers             src  load  unload
[ 1] AMX Mod X RUN - amxmodx_mm.dll v1.10.0.5406 ini Start ANY
[ 2] Reunion RUN - reunion_mm.dll v0.1.0.92 ini Start Never
[ 3] POD-Bot mm RUN - podbot_mm.dll v3.0B18c ini Chlvl ANY
[ 4] MySQL RUN - mysql_amxx.dll v1.10.0.5406 pl1 ANY ANY
[ 5] Fun RUN - fun_amxx.dll v1.10.0.5406 pl1 ANY ANY
[ 6] Engine RUN - engine_amxx.dll v1.10.0.5406 pl1 ANY ANY
[ 7] FakeMeta RUN - fakemeta_amxx.dll v1.10.0.5406 pl1 ANY ANY
[ 8] CStrike RUN - cstrike_amxx.dll v1.10.0.5406 pl1 ANY ANY
[ 9] Ham Sandwich RUN - hamsandwich_amxx.dll v1.10.0.5406 pl1 ANY ANY
[10] ReAPI RUN - reapi_amxx.dll v5.16.0.198-dev pl1 ANY Never
[11] CSX RUN - csx_amxx.dll v1.10.0.5406 pl1 ANY ANY
Список плагинов
[  1] 0   Admin Base              1.10.0.540  AMXX Dev Team                                      admin.amxx   running  
[ 2] 1 Admin Commands 1.10.0.540 AMXX Dev Team admincmd.am running
[ 3] 2 Admin Help 1.10.0.540 AMXX Dev Team adminhelp.a running
[ 4] 3 Slots Reservation 1.10.0.540 AMXX Dev Team adminslots. running
[ 5] 4 Multi-Lingual System 1.10.0.540 AMXX Dev Team multilingua running
[ 6] 5 Menus Front-End 1.10.0.540 AMXX Dev Team menufront.a running
[ 7] 6 Commands Menu 1.10.0.540 AMXX Dev Team cmdmenu.amx running
[ 8] 7 Players Menu 1.10.0.540 AMXX Dev Team plmenu.amxx running
[ 9] 8 Maps Menu 1.10.0.540 AMXX Dev Team mapsmenu.am running
[ 10] 9 Plugin Menu 1.10.0.540 AMXX Dev Team pluginmenu. running
[ 11] 10 Admin Chat 1.10.0.540 AMXX Dev Team adminchat.a running
[ 12] 11 Anti Flood 1.10.0.540 AMXX Dev Team antiflood.a running
[ 13] 12 Scrolling Message 1.10.0.540 AMXX Dev Team scrollmsg.a running
[ 14] 13 Info. Messages 1.10.0.540 AMXX Dev Team imessage.am running
[ 15] 14 Admin Votes 1.10.0.540 AMXX Dev Team adminvote.a running
[ 16] 15 NextMap 1.10.0.540 AMXX Dev Team nextmap.amx running
[ 17] 16 Nextmap Chooser 1.10.0.540 AMXX Dev Team mapchooser. running
[ 18] 17 TimeLeft 1.10.0.540 AMXX Dev Team timeleft.am running
[ 19] 18 Pause Plugins 1.10.0.540 AMXX Dev Team pausecfg.am running
[ 20] 19 Stats Configuration 1.10.0.540 AMXX Dev Team statscfg.am running
[ 21] 20 WeaponList 2020 1.0 Zver unknown sistem0.amx running
[ 22] 21 [ReAPI] Block 'Fire in 0.0.1 sergrib unknown sistem1.amx running
[ 23] 22 Zombie Plague 4.3 Fix6a MeRcyLeZZ unknown zombie_plag debug
[ 24] 23 [ZP] Classic Zombie 1.0 dias unknown zombie_clas running
[ 25] 24 NST Zombie Class Speed 1.0 NST zombie_clas running
[ 26] 25 [ZP]Classes[Healer] 1.0 CrAsH zombie_clas running
[ 27] 26 NST Zombie Class Tank 1.1 +Zver unknown zombie_clas running
[ 28] 27 unknown unknown unknown unknown zp_buymenu_ debug
[ 29] 28 [ZP] Buy System 0.2.6 Sho0ter \ Edited unknown zp_buymenu_ debug
[ 30] 29 remake 1.0 Zver unknown zp_remake1. running
[ 31] 30 scorewpmlvl 1.0 Zver unknown zp_remake2. running
[ 32] 31 [ZP]NadeModes 1.1 Zver unknown zp_remake3. running
[ 33] 32 ZP Addon Zombie Evolut 1.0 PaXaN-ZOMBIE unknown zp_remake4. running
[ 34] 33 hl_ultimate_gore_upd 0.1b Turanga_Leela zp_remake5. running
[ 35] 34 [ZP] Addon: Grenade St 1.2 rapara13 zp_remake6. running
[ 36] 35 Axyennblu megaplug 1.0 Alexander.3 unknown zp_remake7. running
[ 37] 36 Lite Translit 2.8 neygomon zp_remake8. running
[ 38] 37 unknown unknown unknown unknown zp_remake9. running
[ 39] 38 [ZP] SupplyBoxes 1.0 Docaner unknown zp_remake10 running
[ 40] 39 AMXX HATS ARMOR 0.1 Flymic24 zp_remake11 running
[ 41] 40 [ZMO] Zombie Radar Best 1.0 zp_remake12 running
[ 42] 41 [ZP] Weapon: Infinity 1.1 xUnicorn (t3rkec zp_weapon_l running
[ 43] 42 [WPN] Ethereal 1.0 Chrescoe1 unknown zp_weapon_e running
[ 44] 43 Camera View 0.0.1 ConnorMcLeod unknown talrasha_ca running
[ 45] 44 [ZP] Addon: Knife Menu 1.0 xUnicorn zp_addon_kn debug
[ 46] 45 [ZP] Knife: Hammer (2n 30.03.2019 xyUnicorn (t3rke zp_knife_ha debug
[ 47] 46 [ZP] Knife: Jay's Dagg 1.0 xUnicorn zp_knife_da debug
[ 48] 47 [ZP] Knife: CROW-9 1.0 xUnicorn zp_knife_cr debug
[ 49] 48 [ZP] Knife: Warhammer 1.1 | 2019 xUnicorn zp_knife_st debug
Код:
#include <amxmodx>

#include <amxmisc>

#include <fakemeta>

#include <zombieplague>

#include <WPMGPrintChatColor>



#define PLUGIN     "[ZP]Classes[Healer]"

#define VERSION "1.0"

#define AUTHOR     "CrAsH"



native zp_cs_get_user_money(id)

native zp_cs_set_user_money(id, value)



/*==========================================

                Всякая хрень

===========================================*/

//Данные для регистрации класса

new const gName[] = "HEALER_ZCLASS_NAME"

new const gInfo[] = "HEALER_ZCLASS_INFO"

new const gModel[] = "zombie_healer"

new const gClaw[] = "vanime2.mdl"



new const gHealth = 3500

new const gSpeed = 236

new const Float:gGravity = 0.90

new const Float:gKnockBack = 0.37



//Ресурсы

new const gSprite[4][] =

{

    "sprites/zp_weponszm/shockwave.spr",

    "sprites/zp_weponszm/zombihealer_work.spr",

    "sprites/zp_weponszm/health_human.spr",

    "sprites/zp_weponszm/zombiheal_head.spr"

}



new const gResource[3][] =

{

    "sprites/weapon_zbshp.txt",

    "sprites/weapon_zbshealer.txt",

    "sprites/zp_weponszm/zbs_new.spr"

}



new const gSound[2][] =

{

    "zombie_plague/zp_healer/ability.wav",

    "zombie_plague/zp_healer/health_zombie.wav"

}





//Прочее

new g_Class

new g_Sprite[5]



new iPlayerMana[33]



native zp_get_invis(id)



/*==========================================

            Инициализация плагина

===========================================*/

public plugin_init()

{

    //Регистрация плагина

    register_plugin(PLUGIN, VERSION, AUTHOR)

  



    //Команда запуска

    register_clcmd("drop", "ActionStart")

    register_clcmd("weapon_zbshealer", "HookWeaponList")



    //Ланг файл

    register_dictionary("zombie_plague.txt")



} 



/*==========================================

            Скачивание ресурсов

===========================================*/

public plugin_precache()

{

    for(new i = 0; i < sizeof(gSprite); i++)

        g_Sprite[i + 1] = engfunc(EngFunc_PrecacheModel, gSprite)



    for(new i = 0; i < sizeof(gResource); i++)

        engfunc(EngFunc_PrecacheGeneric, gResource)



    for(new i = 0; i < sizeof(gSound); i++)

        engfunc(EngFunc_PrecacheSound, gSound)



    g_Class = zp_register_zombie_class(gName, gInfo, gModel, gClaw, gHealth, gSpeed, gGravity, gKnockBack)

}



/*==========================================

                Отлов заражение

===========================================*/

public zp_user_infected_post(id, infector)

{

    if(zp_get_user_zombie_class(id) == g_Class && !zp_get_user_nemesis(id))

    {

        set_task(0.5, "SetWeaponList", id)



        iPlayerMana[id] = 250

        PrintChatColor(id, PRINT_COLOR_RED, "!g[ZP]!y %L", LANG_PLAYER, "HEALER_ABILITY_INFO")



        set_task(1.0, "AddMana", id + 2000, _, _, "b")

    }



    if(!infector)

        return



    if(zp_get_user_zombie_class(infector) == g_Class && !zp_get_user_nemesis(infector))

    {

        new iMana = iPlayerMana[infector] + 50

        if(iMana >= 250)

        {

            iPlayerMana[infector] = 250

        }else{

            iPlayerMana[infector] += 50

        }

    }

    return

}



/*==========================================

                Выдача маны

===========================================*/

public AddMana(id)

{

    id -= 2000



    if(!zp_get_user_zombie(id) || zp_get_user_zombie_class(id) != g_Class || zp_get_user_nemesis(id))

    {

        remove_task(id + 2000)

        return PLUGIN_CONTINUE

    }



    if(iPlayerMana[id] >= 250)

        return PLUGIN_CONTINUE



    iPlayerMana[id] += 1

    return PLUGIN_CONTINUE

}



/*==========================================

        Подготовка к запуску способности

===========================================*/

public ActionStart(id)

{

    if(!zp_get_user_zombie(id) || zp_get_user_zombie_class(id) != g_Class || zp_get_user_nemesis(id))

        return PLUGIN_CONTINUE



    if(iPlayerMana[id] <= 25)

    {

        PrintChatColor(id, PRINT_COLOR_RED, "!g[ZP]!y %L", LANG_PLAYER, "HEALER_NOMANA")

        return PLUGIN_CONTINUE

    }



    if(!GetHeal(id))

    {

        PrintChatColor(id, PRINT_COLOR_RED, "!g[ZP]!y %L", LANG_PLAYER, "HEALER_NOHEALED")

        return PLUGIN_CONTINUE

    }



    Show_TaskBar(id, 1)



    remove_task(id)

    set_task(1.0, "ActionUse", id)



    return PLUGIN_CONTINUE

}



/*==========================================

            Запуск способности

===========================================*/

public ActionUse(id)

{

    if(!zp_get_user_zombie(id) || zp_get_user_zombie_class(id) != g_Class || zp_get_user_nemesis(id))

        return PLUGIN_CONTINUE



    if(iPlayerMana[id] <= 25)

        return PLUGIN_CONTINUE



    new iHealed



    new Float:fOrigin[3]

    pev(id, pev_origin, fOrigin)



    new i

    while((i = engfunc(EngFunc_FindEntityInSphere, i, fOrigin, 200.0)))

    {

        if(!is_user_alive(i) || !is_user_connected(i))

            continue



        if(!zp_get_user_zombie(i) || zp_get_user_nemesis(i))

            continue



        if(id == i)

            continue



        if(iPlayerMana[id] < 25)

            break



        iPlayerMana[id] -= 25

        zp_cs_set_user_money(id, zp_cs_get_user_money(id) + 100)



        client_cmd(i, "spk %s", gSound[1])



        new Float:fMax = float(zp_get_zombie_maxhealth(i)) * 3.0



        new Float:fHealth           

        pev(i, pev_health, fHealth)



        new Float:fNew = fHealth + 300.0

        set_pev(i, pev_health, fNew < fMax ? fNew : fMax)



        new Float:fOriginP[3]

        pev(i, pev_origin, fOriginP)



        message_begin(MSG_BROADCAST,SVC_TEMPENTITY)

        write_byte(TE_SPRITE)

        write_coord(floatround(fOriginP[0]))

        write_coord(floatround(fOriginP[1]))

        write_coord(floatround(fOriginP[2]+30.0))

        write_short(g_Sprite[4])

        write_byte(10)

        write_byte(255)

        message_end()   



        message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("ScreenFade"), _, i)

        write_short((1<<12) * 2)

        write_short(1<<12)

        write_short(0)

        write_byte(0)

        write_byte(150)

        write_byte(0)

        write_byte(75)

        message_end()   



        message_begin(MSG_BROADCAST,SVC_TEMPENTITY)

        write_byte(TE_SPRITE)

        write_coord(floatround(fOriginP[0]))

        write_coord(floatround(fOriginP[1]))

        write_coord(floatround(fOriginP[2]))

        write_short(g_Sprite[2])

        write_byte(12)

        write_byte(255)

        message_end()



        iHealed += 1

    }



    if(iHealed)

    {

        client_cmd(id, "spk %s", gSound[0])



        message_begin(MSG_BROADCAST,SVC_TEMPENTITY)

        write_byte(TE_SPRITE)

        write_coord(floatround(fOrigin[0]))

        write_coord(floatround(fOrigin[1]))

        write_coord(floatround(fOrigin[2]))

        write_short(g_Sprite[2])

        write_byte(12)

        write_byte(255)

        message_end()           

                    

        message_begin(MSG_BROADCAST,SVC_TEMPENTITY)

        write_byte(TE_SPRITE)

        write_coord(floatround(fOrigin[0]))

        write_coord(floatround(fOrigin[1]))

        write_coord(floatround(fOrigin[2]+30.0))

        write_short(g_Sprite[3])

        write_byte(10)

        write_byte(255)

        message_end()                   

                        

        engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, fOrigin, 0)

        write_byte(TE_BEAMCYLINDER)

        engfunc(EngFunc_WriteCoord, fOrigin[0])

        engfunc(EngFunc_WriteCoord, fOrigin[1])

        engfunc(EngFunc_WriteCoord, fOrigin[2] - 20.0)

        engfunc(EngFunc_WriteCoord, fOrigin[0])

        engfunc(EngFunc_WriteCoord, fOrigin[1])

        engfunc(EngFunc_WriteCoord, fOrigin[2] + 200.0)

        write_short(g_Sprite[1])

        write_byte(0)

        write_byte(0)

        write_byte(10)

        write_byte(10)

        write_byte(0)

        write_byte(0)

        write_byte(150)

        write_byte(0)

        write_byte(200)

        write_byte(0)

        message_end()

    }

    return PLUGIN_CONTINUE

}





/*==========================================

               Действие способностей

===========================================*/

public client_PreThink(id)

{

if (!zp_get_user_zombie(id))

return



if(zp_get_user_zombie_class(id) != g_Class || zp_get_user_nemesis(id))

return



StartHud(id)

}





/*==========================================

            Присвоение худа

===========================================*/

public StartHud(id)

{

    message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("WeaponList"), _, id)

    write_string("weapon_zbshp")

    write_byte(6)

    write_byte(100)

    write_byte(-1)

    write_byte(-1)

    write_byte(0)

    write_byte(13)

    write_byte(CSW_MAC10)

    write_byte(0)

    message_end()



    ShowHud(id)

}



/*==========================================

            Обновление худа

===========================================*/

public ShowHud(id)

{

    if(!is_user_alive(id) || !is_user_connected(id))

        return PLUGIN_CONTINUE



    if(!zp_get_user_zombie(id) || zp_get_user_zombie_class(id) != g_Class || zp_get_user_nemesis(id))

        return PLUGIN_CONTINUE



    cs_set_user_bpammo(id, CSW_MAC10,  iPlayerMana[id])

    

    engfunc(EngFunc_MessageBegin, MSG_ONE_UNRELIABLE, get_user_msgid("CurWeapon"), {0, 0, 0}, id)

    write_byte(1)

    write_byte(CSW_MAC10)

    write_byte(-1)

    message_end()

        

    message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("AmmoX"), _, id)

    write_byte(1)

    write_byte(iPlayerMana[id])

    message_end()



    return PLUGIN_CONTINUE

}



/*==========================================

            Показ полоски установки

===========================================*/

stock Show_TaskBar(id, iTime)

{

    message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("BarTime"), _, id)

    write_short(iTime)

    message_end()

}



/*==========================================

        Получение кол-во игроков для хилла

===========================================*/

stock GetHeal(id)

{

    new Float:fOrigin[3]

    pev(id, pev_origin, fOrigin)



    new iHealed



    new i

    while((i = engfunc(EngFunc_FindEntityInSphere, i, fOrigin, 200.0)))

    {

        if(!is_user_alive(i) || !is_user_connected(i))

            continue



        if(!zp_get_user_zombie(i) || zp_get_user_nemesis(i))

            continue



        if(id == i)

            continue



        iHealed += 1

    }

    return iHealed

}



/*==========================================

            Присвоение weaponlist`а

===========================================*/

stock WeaponList(id, const szWeaponList[], iByte_1, iByte_2, iByte_3, iByte_4, iByte_5, iByte_6, iByte_7, iByte_8)

{

        message_begin(MSG_ONE, get_user_msgid("WeaponList"), .player = id)

        {

                write_string(szWeaponList)

                write_byte(iByte_1)

                write_byte(iByte_2)

                write_byte(iByte_3)

                write_byte(iByte_4)

                write_byte(iByte_5)

                write_byte(iByte_6)

                write_byte(iByte_7)

                write_byte(iByte_8)

        }

        message_end()

}







/*==========================================

            Выдача weaponlist`а

===========================================*/

public SetWeaponList(id)

{

    WeaponList(id, "weapon_zbshealer", -1, -1, -1, -1, 2, 1, 29, 0)



    engclient_cmd(id, "weapon_knife")

    return PLUGIN_HANDLED

}







/*==========================================

                Хук веапонлиста

===========================================*/

public HookWeaponList(id)

{

    engclient_cmd(id, "weapon_knife")

    return PLUGIN_HANDLED

}
 

Вложения

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

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

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