#include <amxmodx>
#include <codmod>
#include <engine>
#include <hamsandwich>
#include <fakemeta>
#include <fun>
new bool:ma_klase[33], bool:zamrozenie[33]
new const nazwa[] = "Mrozon";
new const opis[] = "Posiada 1/5 na zamrozenie";
new const bronie = (1<<CSW_M4A1);
new const zdrowie = 5;
new const kondycja = 15;
new const inteligencja = 5;
new const wytrzymalosc = 10;
public plugin_init()
{
register_plugin(nazwa, "1.0", "RiviT");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
RegisterHam(Ham_TakeDamage, "player", "TakeDamage", 1)
RegisterHam(Ham_Killed, "player", "HamKilledPre", 0)
}
public cod_class_enabled(id)
ma_klase[id] = true
public cod_class_disabled(id)
ma_klase[id] = false
public TakeDamage(this, idinflictor, idattacker)
{
if(!is_user_connected(idattacker) || get_user_team(idattacker) == get_user_team(this) || zamrozenie[this]) return HAM_IGNORED;
if(ma_klase[idattacker] && random_num(1, 12) == 1)
{
zamrozenie[this] = true
set_pev(this, pev_flags, pev(this, pev_flags) | FL_FROZEN)
set_task(2.0, "Odmroz", this)
client_print(this, print_center, "Zostales zamrozony na 2s!")
set_user_rendering(this, kRenderFxGlowShell, 107, 179, 250, kRenderNormal, 20);
}
return HAM_IGNORED;
}
public HamKilledPre(this, attacker)
{
if(is_user_connected(this) && zamrozenie[this])
set_pev(this, pev_flags, pev(this, pev_flags) &~ FL_FROZEN)
}
public Odmroz(id)
{
if(!is_user_alive(id)) return
new origin[3]
get_user_origin(id, origin)
set_pev(id, pev_flags, pev(id, pev_flags) &~ FL_FROZEN)
zamrozenie[id] = false
set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderNormal, 0);
origin[2] += 35
set_user_origin(id, origin)
}
takie ode mnie bo widze w między czasie ktoś uprzedził
Użytkownik SezonowyGracz edytował ten post 11.06.2022 13:32