#include <amxmodx>
#include <fun>
#include <fakemeta>
#include <hamsandwich>
#include <codmod>
#include <colorchat>
#define CZAS 5 //SEKUND NIEWIDZIALNOSCI
new const nazwa[] = "Botek[HardPremium]";
new const opis[] = "Ma 5 sekund niewidzialnosci co runde, zadaje 10% wiecej obrazen z AK47";
new const bronie = 1<<CSW_AK47 | 1<<CSW_DEAGLE;
new const zdrowie = 25;
new const kondycja = 25;
new const inteligencja = 0;
new const wytrzymalosc = 50;
new bool:wykorzystal[33];
new bool:ma_klase[33];
new msg_bartime;
new skoki[33];
public plugin_init() {
register_plugin(nazwa, "1.0", "botek");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
register_event("ResetHUD", "ResetHUD", "abe");
RegisterHam(Ham_TakeDamage, "player", "TakeDamage");
msg_bartime = get_user_msgid("BarTime");
register_forward(FM_CmdStart, "fwCmdStart_MultiJump");
}
public cod_class_enabled(id)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_E))
{
ColorChat(id, RED, "[Botek] Nie masz uprawnien, aby korzystac z tej klasy.");
return COD_STOP;
}
ResetHUD(id);
ma_klase[id] = true;
}
public cod_class_disabled(id)
{
ma_klase[id] = false;
}
public cod_class_skill_used(id)
{
if(!is_user_alive(id))
return;
if(wykorzystal[id])
{
ColorChat(id, RED, "Wykorzystales juz swoja niewidzialnosc.");
return;
}
wykorzystal[id] = true;
set_user_rendering(id,kRenderFxGlowShell,0,0,0 ,kRenderTransAlpha, 1);
set_task(CZAS.0, "wyłącz", id);
message_begin(MSG_ONE, msg_bartime, _, id)
write_short(CZAS)
message_end()
}
public wyłącz(id)
{
if(!is_user_connected(id)) return;
set_user_rendering(id,kRenderFxGlowShell,0,0,0 ,kRenderTransAlpha, 255);
}
public ResetHUD(id)
{
if(ma_klase[id])
wykorzystal[id] = false;
}
public TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits)
{
if(!is_user_connected(idattacker))
return HAM_IGNORED;
if(!ma_klase[idattacker])
return HAM_IGNORED;
if(!(damagebits & (1<<1)))
return HAM_IGNORED;
if(get_user_weapon(idattacker) != CSW_AK47)
return HAM_IGNORED;
cod_inflict_damage(idattacker, this, damage*0.1, 0.0, idinflictor, damagebits);
return HAM_IGNORED;
}
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;///Tu zmieniamy ilosc skokow
return FMRES_IGNORED;
}
O coś takiego chodziło?
Użytkownik Karras edytował ten post 20.10.2013 21:40