This plugin will show a Hud message when you attack or make damage for the zombie. This message will tell you his HP.
Cvars:
ze_hpremain_mode 1 Type of HP remaining ( 1 = Normal | 0 = HUD )
ze_hpremain_commas 1 Enable or Disable Adding Commas to HP? 1 = Enable | 0 = Disable
Installation & Instructions:
Simply install it like any plugin.
Changelog:
Spoiler!
Version: 1.0
First Release.
Version: 1.1
Added new Cvar for Commas.
Fixed problem that message was show everytime zombie take damage from anything.
Version: 1.2 [Current Version]
Update Cvars.
Added HUD mode.
Fixed show HP when infect player.
Screenshots:
The attachment ze_atix_assault_u30000.jpg is no longer available
Pic0
Pic1
Pic2
Pic3
Downloads:
Pic4
Re: Show Zombie HP
Posted: 07 Apr 2017, 12:11
by Raheem
New version Released.
Current Version Now: 1.1
Re: Show Zombie HP
Posted: 11 Aug 2018, 09:51
by czirimbolo
L 08/11/2018 - 09:42:11: Invalid player id 96
L 08/11/2018 - 09:42:11: [AMXX] Displaying debug trace (plugin "ze_show_zombie_hp.amxx", version "1.1")
L 08/11/2018 - 09:42:11: [AMXX] Run time error 10: native error (native "client_print")
L 08/11/2018 - 09:42:11: [AMXX] [0] ze_show_zombie_hp.sma::Fw_TakeDamage_Post (line 24)
This crashed me server 2 times
Re: Show Zombie HP
Posted: 11 Aug 2018, 11:03
by Raheem
Invalid id errors can not crash the server, it's only logged and the message won't be sent if it's invalid. Anyway i added checks to know if this user valid or not:
#include <zombie_escape>
new cvar_enable_commas
public plugin_init()
{
register_plugin("[ZE] Show Zombie HP", "1.1", "Raheem")
// Hook Chains
RegisterHookChain(RG_CBasePlayer_TakeDamage, "Fw_TakeDamage_Post", 1)
// Cvars
cvar_enable_commas = register_cvar("ze_enable_commas_hp", "1")
}
public Fw_TakeDamage_Post(iVictim, iInflictor, iAttacker, Float:fDamage, bitsDamageType)
{
if (!is_user_alive(iVictim) || !is_user_alive(iAttacker))
return
if (get_member(iAttacker, m_iTeam) == TEAM_CT && get_member(iVictim, m_iTeam) == TEAM_TERRORIST)
{
if (get_pcvar_num(cvar_enable_commas) == 1)
{
new szHealth[15];
AddCommas(get_user_health(iVictim), szHealth, charsmax(szHealth))
client_print(iAttacker, print_center,"HP: %s", szHealth)
}
else
{
client_print(iAttacker, print_center,"HP: %i", get_user_health(iVictim))
}
}
}
Re: Show Zombie HP
Posted: 03 May 2021, 16:43
by BandiT
czirimbolo wrote: ↑5 years ago
L 08/11/2018 - 09:42:11: Invalid player id 96
L 08/11/2018 - 09:42:11: [AMXX] Displaying debug trace (plugin "ze_show_zombie_hp.amxx", version "1.1")
L 08/11/2018 - 09:42:11: [AMXX] Run time error 10: native error (native "client_print")
L 08/11/2018 - 09:42:11: [AMXX] [0] ze_show_zombie_hp.sma::Fw_TakeDamage_Post (line 24)