Plug-ins compatibility with Zombie Escape 1.x only!
Raheem
Mod Developer
Posts: 2214 Joined: 7 years ago
Contact:
Quote
0
login to like this post
#1
Post
by Raheem » 7 years ago
Show Zombie HP
Description :
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
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 :
Downloads :
Pic4
He who fails to plan is planning to fail
Raheem
Mod Developer
Posts: 2214 Joined: 7 years ago
Contact:
Quote
0
login to like this post
#2
Post
by Raheem » 7 years ago
New version Released.
Current Version Now: 1.1
He who fails to plan is planning to fail
czirimbolo
Veteran Member
Posts: 598 Joined: 7 years ago
Contact:
Quote
0
login to like this post
#3
Post
by czirimbolo » 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)
This crashed me server 2 times
Raheem
Mod Developer
Posts: 2214 Joined: 7 years ago
Contact:
Quote
0
login to like this post
#4
Post
by Raheem » 5 years ago
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:
Code: Select all
#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))
}
}
}
He who fails to plan is planning to fail
BandiT
Member
Posts: 59 Joined: 4 years ago
Contact:
Quote
0
login to like this post
#5
Post
by BandiT » 3 years ago
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)
This crashed me server 2 times
do you have the fixed plugin ?
czirimbolo
Veteran Member
Posts: 598 Joined: 7 years ago
Contact:
Quote
0
login to like this post
#6
Post
by czirimbolo » 3 years ago
I use this:
Code: Select all
#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))
}
}
}
z0h1r-LK
Mod Developer
Posts: 486 Joined: 5 years ago
Location: The Red City ❤
Contact:
Quote
0
login to like this post
#8
Post
by z0h1r-LK » 1 year ago
Updated to 1.2
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute
Register
Sign in
Users browsing this forum: No registered users and 0 guests