[Зомби мод] Баг после выстрела Снайпера из AWP

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
20
Реакции
3
Ошибка
Игрок становиться "Снайпером" (Похоже на Выжившего), когда игрок стреляет из авп в первого зомби, то он умирает, а остальным (некоторым) зомби ставиться -150 хп, и их модели зависают, а сами эти зомбари не умирают и числятся живыми.
ОС
Linux
Amx Mod X
1.9.0
Билд
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.10.0.759-dev
Build date: 15:34:13 Jun 22 2021 (2628)
Build from: https://github.com/dreamstalker/rehlds/commit/ad6f6ad
ReGamedll
ReGameDLL version: 5.21.0.540-dev
Build date: 17:32:55 Oct 25 2021
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/b9cccc6
Версия Metamod
Metamod-r v1.3.0.128, API (5:13)
Metamod-r build: 15:47:38 Aug 24 2018
Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/0cf2f70
Список метамодулей
Currently loaded plugins:
description stat pend file vers src load unload
[ 1] SafeNameAndChat RUN - safenameandchat.dll v1.1 ini ANY ANY
[ 2] Reunion RUN - reunion_mm.dll v0.1.0.137 ini Start Never
[ 3] Revoice RUN - revoice_mm.dll v0.1.0.34 ini Start Never
[ 4] AMX Mod X RUN - amxmodx_mm.dll v1.9.0.5271 ini Start ANY
[ 5] Rechecker RUN - rechecker_mm.dll v2.5 ini Chlvl ANY
[ 6] ReSemiclip RUN - resemiclip_mm.dll v2.3.9 ini Chlvl ANY
[ 7] Fun RUN - fun_amxx.dll v1.9.0.5271 pl4 ANY ANY
[ 8] Engine RUN - engine_amxx.dll v1.9.0.5271 pl4 ANY ANY
[ 9] FakeMeta RUN - fakemeta_amxx.dll v1.9.0.5271 pl4 ANY ANY
[10] GeoIP RUN - geoip_amxx.dll v1.9.0.5271 pl4 ANY ANY
[11] CStrike RUN - cstrike_amxx.dll v1.9.0.5271 pl4 ANY ANY
[12] CSX RUN - csx_amxx.dll v1.9.0.5271 pl4 ANY ANY
[13] Ham Sandwich RUN - hamsandwich_amxx.dll v1.9.0.5271 pl4 ANY ANY
[14] ReAPI RUN - reapi_amxx.dll v5.21.0.248-dev pl4 ANY Never
[15] MySQL RUN - mysql_amxx.dll v1.9.0.5271 pl4 ANY ANY
15 plugins, 15 running
Список плагинов
Currently loaded plugins:
name version author file status
[ 1] Block Radio Commands 1.0 d3m37r4 block_radiocmd. running
[ 2] [ReAPI] Hint blocker 0.1.0 F@tn0M reapi_hint_bloc running
[ 3] [ReAPI] Block Fire in 3.1.0 F@nt0M reapi_block_fit running
[ 4] No Bhop and SGS/DDRun 1.1 Denzer no_bhop_sgs.amx running
[ 5] REMOVE CORPSE 2.0 fl0wer | MayroN remove_corpse.a running
[ 6] Admin Base 1.9.0.5271 AMXX Dev Team admin.amxx running
[ 7] Admin Commands 1.9.0.5271 AMXX Dev Team admincmd.amxx running
[ 8] Admin Help 1.9.0.5271 AMXX Dev Team adminhelp.amxx running
[ 9] Commands Menu 1.9.0.5271 AMXX Dev Team cmdmenu.amxx running
[ 10] Players Menu 1.9.0.5271 AMXX Dev Team plmenu.amxx running
[ 11] Maps Menu 1.9.0.5271 AMXX Dev Team mapsmenu.amxx running
[ 12] Admin Chat 1.9.0.5271 AMXX Dev Team adminchat.amxx running
[ 13] Admin Votes 1.9.0.5271 AMXX Dev Team adminvote.amxx running
[ 14] Pause Plugins 1.9.0.5271 AMXX Dev Team pausecfg.amxx running
[ 15] Stats Configuration 1.9.0.5271 AMXX Dev Team statscfg.amxx running
[ 16] Restrict Weapons 1.9.0.5271 AMXX Dev Team restmenu.amxx running
[ 17] [AMXX] Settings API 1.2 MeRcyLeZZ | Perf amx_settings_ap running
[ 18] Zombie Plague Special 4.5 MeRcyLeZZ | @bdu zombie_plague_s debug
[ 19] Chat Manager 1.1.2-16 Mistrick chatmanager.amx running
[ 20] Chat Manager: Addon 0.0.4-70 Mistrick chatmanager_add running
[ 21] [ZPSp] Addon: XP Syste 1.1 Supremache | Per zpsp_xp_system. running
[ 22] [ZPSp] Addon: Item Lim 1.2 WiLS | [P]erfect zpsp_extra_item running
[ 23] [ZP] Plugin: Player Sk 1.1 [P]erfec[T] [S]c zpsp_custom_pla running
[ 24] [ZP] Addon: First Zomb 1.2 [P]erfect [S]cra zpsp_addon_firs running
[ 25] Register System 9.0 m0skVi4a Edit: R RegisterSystem. running
[ 26] [ZPSp] Addon: Vip Syst 1.2 [P]erfec[T] [S]c zpsp_vip_system running
[ 27] [ZP]Auto-Respawn 1.1 LuqqasBugsy&Hatt zp_respawn.amxx running
[ 28] zpbank_and_lvl_save_in 1.0 By Robert7791 zpbank_and_lvl_ running
[ 29] NadeModes 11.2 Nomexous & OT nademodes.amxx running
[ 30] [ZP] Assassin vs Snipe 1.2 @bdul! | [P]erfe zp_game_mode_as running
[ 31] [ZP] Nightmare Mode 1.3 @bdul! | [P]erfe zp_game_mode_ni running
[ 32] [ZP] Remix Mode 1.4 @bdul! | [P]erfe zpsp_game_mode_ running
[ 33] VipMenu 1.0 Robert7791 menuvip.amxx running
[ 34] [Customizable] AmxModM 0.0.4 Albertio amxmodmenu.amxx running
[ 35] Choose menu mode 1.0 Robert7791 zp_choose_round debug
[ 36] Generator Menu 1.0.0 Robert7791 generator_menu. running
[ 37] Prefix_in_zmenu 1.0 Robert7791 prefix_in_zmenu running
[ 38] Language Menu 1.0 F@nt0M langmenu.amxx running
[ 39] Camera Changer 1.0 Bl0ck & Oli camera_changer_ running
[ 40] VOTEBAN_BY_SLIMSHADY 3.0 SLIMSHADY_MOD voteban_by_slim running
[ 41] [ZP] Extra: Anti-Infec 1.0 MeRcyLeZZ vip_extra_human running
[ 42] [ZP] Weapon: M4A1 Silv 1.0 xUnicorn (t3rkec zp_extra_m4a1_s running
[ 43] [ZP] Default Zombie Cl 4.3 Fix5 MeRcyLeZZ zpsp_zombie_cla running
[ 44] unknown unknown unknown azp_zclass_regu running
[ 45] [ZP] Human Classes 1.0 Perf. Scrash zpsp_human_clas running
[ 46] [ZPSp] XP Upgrade: Hea 1.0 Perf. Scrash zpsp_xp_upgrade running
[ 47] [ZPSp] XP Upgrade: Par 1.0 H.RED.ZONE | Per zpsp_xp_upgrade running
[ 48] Map Manager: Core 3.1.4 Mistrick map_manager_cor running
[ 49] Map Manager: Scheduler 0.1.9 Mistrick map_manager_sch running
[ 50] Map Manager: Rtv 0.1.1 Mistrick map_manager_rtv running
[ 51] Map Manager: Nominatio 0.2.0 Mistrick map_manager_nom running
[ 52] Map Manager: BlockList 0.0.4 Mistrick map_manager_blo running
[ 53] Map Manager: Effects 0.1.0 Mistrick map_manager_eff running
[ 54] Map Manager: Informer 0.0.5 Mistrick map_manager_inf running
[ 55] Map Manager: Sounds 0.0.1 Mistrick map_manager_sou running
[ 56] Map Manager: GUI 0.0.6 Mistrick map_manager_gui running
[ 57] Knife System 2.1 Oli knifes_system.a running
[ 58] [ZP] Weapon: Minigun ( 4.0 Edit: Robert7791 WPN_Minigun_Nem running
[ 59] Zp_Survivor_Weapon 1.0 Robert7791 survior_weapon. running
[ 60] No Survivor Recoil v1.0 Stone/Mog no_survivor_rec running
[ 61] [ReAPI] CMD Kill 0.1 amxx скрип? aax.amxx debug
[ 62] Two Minutes 1.0 Robert7791 atwo_minutes.am running
[ 63] Real Lighting 1.0 Robert7791 real_lighting.a running
[ 64] Damager 1.0 Kulogram damager_new.amx running
[ 65] [ZP] Executor System 18.07.2022 Oli zp_executor_sys running
[ 66] [Zp] Addon: Kill Zombi 1.0 Robert7791 ZM_Addon_Zombie debug
[ 67] unknown unknown unknown zp_extra_armor. running
[ 68] ZP Extraitem: AKM Balr 1.0 Base: Batcon & x zp_extraitems_a running
[ 69] unknown unknown unknown zp_ak47g.amxx running
[ 70] [ZP] Extra: MG36 1.0 LARS-DAY[BR]EAKE zp_extra_balrog running
[ 71] [ZP] Weapon: THANATOS- 2.0 xUnicorn (t3rkec zp_extra_thanat running
[ 72] ZP Extraitem: VSK-94 1.0 Base: Batcon; Re zp_extraitems_v running
[ 73] [ZP] Extra: CrossBow 1.0 Crock / =) (Popr zp_extra_balbow running
[ 74] [CSO] Item: Balrog-7 1.0 Crock =) / 707Sp zp_extra_balrog running
[ 75] [ZP] Weapon: M32 1.0 PbI)I(Uu' / Batc zp_extra_m32.am running
[ 76] [ZP] Weapon: Salamande 1.0 xUnicorn (t3rkec zp_extra_flamet running
[ 77] [ZP] Extra: CSO Weapon 1.0 KORD_12.7 Weapon_ZhuBajie running
77 plugins, 77 running
Автор плагина
[ 66] [Zp] Addon: Kill Zombi 1.0 Robert7791 ZM_Addon_Zombie debug
Версия плагина
1.0
Исходный код
/* ---------------------------------------------------------------------------- */
// |-- >>> PLUGIN, VERSION AND AUTHOR <<< --|
/* ---------------------------------------------------------------------------- */

new const PVA[][] = { "[Zp] Addon: Kill Zombie Give Health", "1.0", "Ragafona: Edit by Robert7791" };

/* ---------------------------------------------------------------------------- */
// |-- >>> Lib`s <<< --|
/* ---------------------------------------------------------------------------- */

#include < AmxModX >
#include < ReApi >
#include < Zombie_Plague_Special>


const GIVE_HEALTH = 150;

// |-- Список зомби классов которым не выдается здоровье --| //
new const g_strZombieClasses[][] =
{
"Класс зомби"
}

/* ---------------------------------------------------------------------------- */
// |-- >>> AMXMODX <<< --|
/* ---------------------------------------------------------------------------- */

public plugin_init() {

register_plugin( PVA[ 0 ], PVA[ 1 ], PVA[ 2 ] );

RegisterHookChain( RG_CBasePlayer_Killed, "CPlayer__Killed_Post", .post = true );
}

/* ---------------------------------------------------------------------------- */
// |-- >>> REAPI <<< --|
/* ---------------------------------------------------------------------------- */

public CPlayer__Killed_Post( pVictim, pKiller ) {

if( !zp_get_user_zombie( pVictim ) || zp_get_user_nemesis( pVictim ) )
return HC_CONTINUE;

static aPlayers[ 32 ], iPlayersCount; get_players( aPlayers, iPlayersCount, "h" );

if( !iPlayersCount )
return HC_CONTINUE;

static iBonusHealth; iBonusHealth = GIVE_HEALTH + get_user_health( pVictim );
static strClass[ 64 ]; new strZombie[] = {"Zombie"};

for( new iCase, iPlayer ; iCase < iPlayersCount ; iCase++ )
{
iPlayer = aPlayers[ iCase ];
new strName[512]
zp_get_special_class_name(iPlayer, strName, 512)

if( !is_user_alive( iPlayer ) || !equal(strName,strZombie))
continue;

zp_get_zombie_class_name( zp_get_user_zombie_class( iPlayer ), strClass, charsmax( strClass ) );

if( !CPlayer__ValidZombieClass( strClass ) )
continue;

set_entvar( iPlayer, var_health, Float: get_entvar( iPlayer, var_health ) + float( iBonusHealth ) );
}

return HC_CONTINUE;
}

CPlayer__ValidZombieClass( strClass[] ) {

for( new iCase ; iCase < sizeof( g_strZombieClasses ) ; iCase++ )
if( equal( strClass, g_strZombieClasses[ iCase ] ) )
return false;

return true;
}

/* ---------------------------------------------------------------------------- */
Зомби мод, который использую https://forums.alliedmods.net/showthread.php?t=260845

P.S Данная ошибка появляется в режиме "Снайпер", в остальных режимах она не появлялась.

Данный плагин добавляет всем зомбакам доп кол-во хп, если одного из зомбарей убили

Спасибо!
 
В этой теме было размещено решение! Перейти к решению.
Последнее редактирование:
Сообщения
893
Реакции
149
Помог
25 раз(а)
Попробуй так. У тебя вообще идет так, что ты 2 раза получаешь жизни игрока.
Diff:
-set_entvar( iPlayer, var_health, Float: get_entvar( iPlayer, var_health ) + float( iBonusHealth ) );
Diff:
+set_entvar( iPlayer, var_health, Float: get_entvar( iPlayer, var_health ) + float( GIVE_HEALTH ) );
 
Сообщения
20
Реакции
3
ImmortalAmxx, Да, ты прав. Чет проглядел это, получается из-за второго получения хп и происходил баг. Спасибо
 
Статус
В этой теме нельзя размещать новые ответы.

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

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