#include <amxmodx>
#include <engine>
#include <codmod>
#define FALL_VELOCITY 350.0
new const nazwa[] = "Hardcor";
new const opis[] = "Nie zabiera mu HP po upadku";
new const bronie = 1<<CSW_USP | 1<<CSW_MAC10 | 1<<CSW_UMP45;
new const zdrowie = 10;
new const kondycja = 10;
new const inteligencja = -15;
new const wytrzymalosc = 10;
new bool:falling[33];
new bool:ma_klase[33];
public plugin_init() {
register_plugin(nazwa, "1.0", "manipers");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
if(!cvar_exists("mp_falldamage"))
register_cvar("mp_falldamage", "0");
}
public cod_class_enabled(id)
ma_klase[id] = true;
public cod_class_disabled(id)
ma_klase[id] = false;
public client_PreThink(id)
{
if(ma_klase[id])
{
if(get_cvar_num("mp_falldamage") == 0
&& is_user_alive(id)
&& is_user_connected(id))
{
if(entity_get_float(id, EV_FL_flFallVelocity) >= FALL_VELOCITY)
{
falling[id] = true;
}
else
{
falling[id] = false;
}
}
}
}
public client_PostThink(id)
{
if(ma_klase[id])
{
if(get_cvar_num("mp_falldamage") == 0
&& is_user_alive(id)
&& is_user_connected(id))
{
if(falling[id])
{
entity_set_int(id, EV_INT_watertype, -3);
}
}
}
}