what about this?
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#define MAX_COLOR 187
public plugin_init()
{
register_plugin("Glow by Health", "1.0", "Kensai")
register_event("Damage" , "health" , "b" , "2!0")
register_event("ResetHUD" , "health" , "b" )
}
public health(id)
{
new health = get_user_health(id)
new Float:factor=float(MAX_COLOR)/100.0 //1.87
new r=MAX_COLOR-floatround((float(health)*factor))
new g=floatround((float(health)*factor))
set_user_rendering(id, kRenderFxGlowShell, r, g, 4, kRenderTransAlpha, 255)
return PLUGIN_CONTINUE;
}
[edit] thx VEN !
__________________