Plugin Show Zombie's Health For Biohazard Mode
This plugin adds the zombie's health in the middle of the screen when you shoot him. It was originaly ported from Zombie Plague mode.
Source Code:
Code:
#include < amxmodx >
#include < hamsandwich>
#include < fun >
#include < biohazard >
new const PLUGIN_NAME[ ] = "[Bio] Display Zombie HP",
PLUGIN_VERSION[ ] = "1.0",
PLUGIN_AUTHOR[ ] = "eLLectro";
public plugin_init( ) {
register_plugin( PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR );
is_biomod_active( ) ? plugin_init2( ) : pause( "ad" );
}
public plugin_init2( ) {
RegisterHam( Ham_TakeDamage, "player", "Ham_TakeDamagePlayerPost", 1 );
}
public Ham_TakeDamagePlayerPost( iVictim, iInflictor, iAttacker, Float:fDamage, damage_type ) {
if( iVictim != iAttacker && is_user_alive( iAttacker ) && is_user_zombie( iVictim ) ) {
new VictimHealth = get_user_health( iVictim );
if( VictimHealth < 0 )
VictimHealth = 0;
client_print( iAttacker, print_center, "%d", VictimHealth );
}
}