/* Plugin generated by AMXX-Studio */

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

#define AUTHOR "Play"


new const perk_name[] = "Crazy Jump";
new const perk_desc[] = "Nie tracisz HP spadajac z wysokosci";

new bool:ma_perk[33];

public plugin_init() 
{
	register_plugin(perk_name, "1.0", "Play");
	
	cod_register_perk(perk_name, perk_desc);
	
	RegisterHam(Ham_TakeDamage, "player","TakeDamage");
}

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

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

public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits)
{
	if(!is_user_connected(this))
		return HAM_IGNORED;

	if(!ma_perk[this])
		return HAM_IGNORED;  

		
	if(damagebits & (1<<5))
		SetHamParamFloat(4, 0.0);

		
	return HAM_IGNORED;
}