
   /*
   *   Glow by Health
   *   By Freecode
   *   Version: 1.1
   *
   *   Modded by Freecode
   *   Version 1.1
   *
   *   This plugin will make all players glow depending on their health.
   *   100 health = green || 1 health = red
   *   If you go from 100 - 1 slowly it will change you color slowly
   *   from green to red.
   *
   *
   *  Commands:
   *  ========
   *  amx_healthglow <1 = On || 0 = Off>
   *
   *  To Do:
   *  ========
   *  Nothing
   *
   *   Have Fun
   */
   #include <amxmod>
   public spawn(id){
     if (get_cvar_num("amx_healthglow")!=1) return PLUGIN_HANDLED
     new health = get_user_health(id)
     new Float:Red = ((1.0 - (float(health) / 100.0)) * 255.0)
     new Float:Green = ((float(health) / 100.0) * 255.0)
     set_user_rendering(0, kRenderFxGlowShell,0,255,0, kRenderNormal, 40)
     set_user_rendering(id,      kRenderFxGlowShell,     floatround(Red),
   floatround(Green), 0, kRenderNormal, 40)
     return PLUGIN_HANDLED
   }
   public event_damage(id){
     if (get_cvar_num("amx_healthglow")!=1) return PLUGIN_HANDLED
     new health = get_user_health(id)
     new Float:Red = ((1.0 - (float(health) / 100.0)) * 255.0)
     new Float:Green = ((float(health) / 100.0) * 255.0)
     set_user_rendering(id,      kRenderFxGlowShell,     floatround(Red),
   floatround(Green), 0, kRenderNormal, 40)
     return PLUGIN_HANDLED
   }
   public plugin_init(){
     register_plugin("Glow by Health","1.1","Freecode")
     register_event("Damage","event_damage","b")
     register_event("ResetHUD","spawn","be","1=1")
     register_cvar("amx_healthglow","1")
   }
