/* Plugin generated by AMXX-Studio */

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

new bool:ma_klase[33];

new const nazwa[] = "Obronca";
new const opis[] = "Widzi miny";
new const bronie = 1<<CSW_M249 | 1<<CSW_HEGRENADE | 1<<CSW_SMOKEGRENADE | 1<<CSW_FLASHBANG;
new const zdrowie = 0;
new const kondycja = 10;
new const inteligencja = 0;
new const wytrzymalosc = 0;

public plugin_init() 
{
	register_plugin(nazwa, "1.0", "QTM_Peyote");
	
	cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
	register_forward(FM_AddToFullPack, "FwdAddToFullPack", 1);
}

public cod_class_enabled(id)
	ma_klase[id] = true;

public cod_class_disabled(id)
	ma_klase[id] = false;

public FwdAddToFullPack(es_handle, e, ent, host, hostflags, player, pSet)
{
	if(!is_user_connected(host))
		return;
	
	if(!ma_klase[host])
		return;
	
	if(!pev_valid(ent))
		return;
	
	new classname[5];
	pev(ent, pev_classname, classname, 4);
	if(equal(classname, "mine"))
	{
		set_es(es_handle, ES_RenderMode, kRenderTransAdd);
		set_es(es_handle, ES_RenderAmt, 90.0);
	}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par }
*/
