1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87. | /* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <codmod>
#include <fakemeta>
#include <fun>
#include <hamsandwich>
new const nazwa[] = "Zabojca";
new const opis[] = "Ma podwojny skok, cichy bieg i 1/9 szans na wyrzucenie broni przeciwnika.";
new const bronie = 1<<CSW_AK47 | 1<<CSW_M4A1 | 1<<CSW_DEAGLE;
new const zdrowie = 70;
new const kondycja = 50;
new const inteligencja = 40;
new const wytrzymalosc = 40;
new bool:ma_klase[33];
new bool:moze_skoczyc[33];
public plugin_init() {
register_plugin(nazwa, "1.0", "QTM_Peyote");
cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
RegisterHam(Ham_TakeDamage, "player", "TakeDamage");
register_forward(FM_CmdStart, "CmdStart");
}
public cod_class_enabled(id)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_E))
{
client_print(id, print_chat, "[Zabojca] Nie masz uprawnien, aby uzywac tej klasy.")
return COD_STOP;
}
set_user_footsteps(id, 1);
ma_klase[id] = true;
moze_skoczyc[id] = true;
return COD_CONTINUE;
}
public cod_class_disabled(id)
{
set_user_footsteps(id, 0);
ma_klase[id] = false;
}
public Damage(id)
{
new idattacker = get_user_attacker(id);
if(!is_user_alive(idattacker))
return;
if(!ma_klase[idattacker])
return;
if(random_num(1, 9) != 1)
return;
client_cmd(id, "drop");
}
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;
return FMRES_IGNORED;
}
|