#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <engine>
#include <fakemeta>
#include <fun>
#include <hamsandwich>
#define ZADANIE_WSKRZES 6240
new const nazwa[] = "Aniol";
new const opis[] = "Dostaje UMP45 i Ma 1/3 Szans Na Odrodzenie Się Po Śmierci oraz Podwójny Skok";
new const bronie = (1<<CSW_HEGRENADE) | (1<<CSW_DEAGLE) | (1<<CSW_UMP45);
new const zdrowie = 5;
new const kondycja = 15;
new const inteligencja = 0;
new const wytrzymalosc = 5;
new skoki[33];
new ma_klase[33];
public plugin_init()
{
register_plugin(nazwa, "1.0", "amxx.pl");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
register_forward(FM_CmdStart, "fwCmdStart_MultiJump");
RegisterHam(Ham_Killed, "player", "Killed", 1);
}
public cod_class_enabled(id)
{
set_rendering(id,kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 254);
give_item(id, "weapon_hegrenade");
ma_klase[id] = true;
}
public cod_class_disabled(id)
{
set_rendering(id,kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 255);
ma_klase[id] = false;
}
public fwCmdStart_MultiJump(id, uc_handle)
{
if(!is_user_alive(id) || !ma_klase[id])
return FMRES_IGNORED;
new flags = pev(id, pev_flags);
if((get_uc(uc_handle, UC_Buttons) & IN_JUMP) && !(flags & FL_ONGROUND) && !(pev(id, pev_oldbuttons) & IN_JUMP) &&
skoki[id])
{
skoki[id]--;
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)
skoki[id] = 1;
return FMRES_IGNORED;
}
public Killed(id)
{
if(!is_user_alive(id))
return;
if(!ma_klase[id])
return;
if(random_num(1,3) == 1)
set_task(0.1, "Wskrzes", id+ZADANIE_WSKRZES);
}
public Wskrzes(id)
ExecuteHamB(Ham_CS_RoundRespawn, id-ZADANIE_WSKRZES);Proszę o znalezienie błedu i o poprawę. Za pomoc daję plusy ;]


Dodatki SourceMod












