
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <codmod>
#include <fakemeta>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
new ma_klase[33];
new bool:moze_skoczyc[33];
new const nazwa[] = "Totalny Rozrabiaka";
new const opis[] = "Moze zrobic podwojny skok i nie posiada rozrzutu broni.";
new const bronie = 1<<CSW_AK47 | 1<<CSW_GLOCK18;
new const zdrowie = 60;
new const kondycja = 40;
new const inteligencja = 15;
new const wytrzymalosc = 20;
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
register_forward(FM_CmdStart, "CmdStart");
register_forward(FM_UpdateClientData, "UpdateClientData", 1)
}
public CmdStart(id, uc_handle)
{
if(!ma_klase[id])
return FMRES_IGNORED;
new button = get_uc(uc_handle, UC_Buttons);
new oldbutton = pev(id, pev_oldbuttons);
new flags = pev(id, pev_flags);
if((button & IN_JUMP) && !(flags & FL_ONGROUND) && !(oldbutton & IN_JUMP) && moze_skoczyc[id])
{
moze_skoczyc[id] = false;
new Float:velocity[3];
pev(id, pev_velocity, velocity);
velocity[2] = random_float(265.0,285.0);
set_pev(id, pev_velocity, velocity);
}
else if(flags & FL_ONGROUND)
moze_skoczyc[id] = true;
set_pev(id, pev_punchangle, {0.0,0.0,0.0})
return FMRES_IGNORED;
}
public UpdateClientData(id, sw, cd_handle)
{
if(ma_klase[id])
set_cd(cd_handle, CD_PunchAngle, {0.0,0.0,0.0})
}
public cod_class_enabled(id)
{
ma_klase[id] = 1;
}
public cod_class_disabled(id)
{
ma_klase[id] = 0;
}