/* Plugin generated by AMXX-Studio */

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

new const perk_name[] = "Maksymalne skupienie";
new const perk_desc[] = "Za kazdego fraga dostajesz dodatkowe 20 doswiadczenia";

new bool:ma_perk[33];

public plugin_init() 
{
	register_plugin(perk_name, "1.0", "QTM_Peyote");
	
	cod_register_perk(perk_name, perk_desc);
	
	register_event("DeathMsg", "Death", "ade");
}

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

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

public Death(id)
{
	new attacker = read_data(1);
	if(!is_user_connected(attacker))
		return PLUGIN_CONTINUE;
	
	if(!ma_perk[attacker])
		return PLUGIN_CONTINUE;
		
	if(get_user_team(id) != get_user_team(attacker))
		cod_set_user_xp(id, cod_get_user_xp(id)+20);
	
	return PLUGIN_CONTINUE;
}
