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. | /* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <engine>
#include <hamsandwich>
#include <colorchat>
#define DMG_BULLET (1<<1)
#define DMG_HE (1<<24)
new bool:ma_klase[33];
new const nazwa[] = "Elitarny Sniper [P]";
new const opis[] = "Klasa premium, ma 1/1 szansy na zabicie z awp i 1/1 z noza mniejsza widocznosc z nozem o 40%";
new bronie = 1<<CSW_AWP | 1<<CSW_SCOUT | 1<<CSW_DEAGLE;
new const zdrowie = 35;
new const kondycja = 100;
new const inteligencja = 10;
new const wytrzymalosc = 10;
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");
}
public cod_class_enabled(id)
{
ColorChat(id, GREEN, "Klasa %s zostala stworzona przez www.PluginyMody.webd.pl.", nazwa);
if(!(get_user_flags(id) & ADMIN_LEVEL_H))
{
client_print(id, print_chat, "[%s] Nie masz uprawnien, aby uzywac tej klasy.", nazwa)
return COD_STOP;
}
ma_klase[id] = true;
return COD_CONTINUE;
}
public cod_class_disabled(id)
ma_klase[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 & DMG_BULLET)
{
new weapon = get_user_weapon(idattacker);
if(weapon == CSW_AWP)
cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
}
if(get_user_weapon(idattacker) == CSW_KNIFE && damagebits & DMG_BULLET && damage > 20.0)
cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
new weapon = get_user_weapon(idattacker);
if(weapon == CSW_SCOUT)
cod_inflict_damage(idattacker, this, float(get_user_health(this))-damage+1.0, 0.0, idinflictor, damagebits);
return HAM_IGNORED;
}
public client_PreThink(id)
{
if(!ma_klase[id])
return;
if(get_user_weapon(id) == CSW_KNIFE)
set_rendering(id,kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 10);
else
set_rendering(id,kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 255);
} |