/* Plugin generated by AMXX-Studio */

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

#define DMG_BULLET (1<<1)

new const perk_name[] = "Hardcore";
new const perk_desc[] = "Dostajesz M4A1, oraz +10 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)
{
	cod_give_weapon(id, CSW_M4A1);
	cs_set_user_armor(id, 10, CS_ARMOR_VESTHELM);
	ma_perk[id] = true;
}

public cod_perk_disabled(id)
{
	cod_take_weapon(id, CSW_M4A1);
	cs_set_user_armor(id, 0, CS_ARMOR_NONE);
	ma_perk[id] = false;
}
public Odrodzenie(id)
{
	if(ma_perk[id])
		cs_set_user_armor(id, 150, CS_ARMOR_VESTHELM);
}