/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <codmod>
#include <cstrike>
#include <hamsandwich>


new const perk_name[] = "Kamizelka";
new const perk_desc[] = "Dostajesz 30 Pancerza";

new bool: ma_perk[33];

public plugin_init() 
{
	register_plugin(perk_name, "1.0", "Play");
	cod_register_perk(perk_name, perk_desc);
	RegisterHam(Ham_Spawn, "player", "Odrodzenie", 1);
}

public cod_perk_enabled(id)
{
	cs_set_user_armor(id, 30, CS_ARMOR_VESTHELM); //100 - ilość pancerza
	ma_perk[id] = true;
}
	
public cod_perk_disabled(id)
{
	ma_perk[id] = false;
	cs_set_user_armor(id, 0, CS_ARMOR_NONE);
}
	
public Odrodzenie(id)
{
	if(ma_perk[id])
		cs_set_user_armor(id, 150, CS_ARMOR_VESTHELM);
}	

/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par }
*/
