/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <codmod>
#include <engine>

new nazwa[] = "NanoSuit"
new opis[] = "Masz tylko 1 HP, ale jestes w 100 procentach niewidzialny"

new bool:ma_perk[33];

public plugin_init() 
{
	register_plugin(nazwa, "1.0", "Play");
	register_event("ResetHUD", "ResetHUD", "abe");
	cod_register_perk(nazwa, opis);
}
public cod_perk_enabled(id)
{	
	ma_perk[id] = true;
	cod_set_user_bonus_health(id, -(cod_get_user_health(id, 1, 1, 0)+99));
	set_rendering(id,kRenderFxGlowShell,0,0,0 ,kRenderTransAlpha, 1);
}
public cod_perk_disabled(id)
{
	ma_perk[id] = false;
	cod_set_user_bonus_health(id, 0);
	set_rendering(id,kRenderFxGlowShell,0,0,0 ,kRenderTransAlpha, 255);
}
public ResetHUD(id)
{
	if(ma_perk[id])
	{
		cod_set_user_bonus_health(id, -(cod_get_user_health(id, 1, 1, 0)+99));
	}
}
