/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <fakemeta>
#include <codmod>

new const perk_name[] = "Sokole Oko";
new const perk_desc[] = "Widzisz niewidzialnych";

new bool:ma_perk[33];

public plugin_init()
 {
	register_plugin(perk_name, "1.0", "Play");
	
	cod_register_perk(perk_name, perk_desc);
	register_forward(FM_AddToFullPack, "FwdAddToFullPack", 1)
}

public cod_perk_enabled(id)
{
	ma_perk[id] = true;
	return COD_CONTINUE;
}

public cod_perk_disabled(id)
	ma_perk[id] = false;
	

public FwdAddToFullPack(es_handle, e, ent, host, hostflags, player, pSet)
{
	if(!is_user_connected(host) || !is_user_connected(ent))
		return;
		
	if(!ma_perk[host])
		return;
		
	set_es(es_handle, ES_RenderAmt, 255.0);
}
