try this code from plugin zmobie HL1 by KORD
Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta_util>
public plugin_init() {
register_message(get_user_msgid("Health"), "message_health")
}
// Fix for the HL engine bug when HP is multiples of 256
public message_health(msg_id, msg_dest, msg_entity)
{
// Get player's health
static health
health = get_msg_arg_int(1)
// Don't bother
if(health < 256)
return
// Check if we need to fix it
if(health % 256 == 0)
fm_set_user_health(msg_entity, pev(msg_entity, pev_health) + 1)
// HUD can only show as much as 255 hp
set_msg_arg_int(1, get_msg_argtype(1), 255)
}
__________________