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


new const perk_name[] = "Grawitacja";
new const perk_desc[] = "Dostajesz 50% wyzszy skok";

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", "Spawn", 1);
}

public cod_class_enabled(id)
{
	entity_set_float(id, EV_FL_gravity, 400.0/800.0);
	ma_perk[id] = true;
}
public cod_class_disabled(id)
{
	entity_set_float(id, EV_FL_gravity, 800.0/800.0);
	ma_perk[id] = false;
}


public Spawn(id)
{
	if(is_user_connected(id) && ma_perk[id])
	{
		entity_set_float(id, EV_FL_gravity, 400.0/800.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 }
*/
