Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Wklejka a0nka4tbd94c dodana przez Engi, 19.05.2012 20:29
Typ:



Zjaraniec
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.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
112.
113.
#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <engine>
#include <fakemeta>
#include <hamsandwich>
 
#define DMG_BULLET (1<<1)
new const nazwa[]   = "Zjaraniec";
new const opis[]        = "Sekret";
new const bronie        = (1<<CSW_SCOUT)|(1<<CSW_DEAGLE);
new const zdrowie   = 0;
new const kondycja  = 100;
new const inteligencja = 0;
new const wytrzymalosc = 0;
new skoki[33];
new ma_klase[33];
new zygfryd[33][31]
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");
	register_forward(FM_PlayerPreThink, "fwPrethink_Niewidzialnosc", 1);
	RegisterHam(Ham_TakeDamage, "player", "jedenz");
	RegisterHam(Ham_TakeDamage, "player", "kosa");
}
public cod_class_enabled(id)
{
	if(!(get_user_flags(id) & ADMIN_LEVEL_C))
	{
		client_print(id, print_chat, "[Zjaraniec] Nie masz uprawnien, aby uzywac tej klasy.")
		return COD_STOP;
	}
	zygfryd[id][CSW_SCOUT] = 1
	zygfryd[id][CSW_DEAGLE] = 3
	set_rendering(id,kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 255);
	ma_klase[id] = true;
	return COD_CONTINUE;
}
public cod_class_disabled(id)
{
	zygfryd[id][CSW_SCOUT] = 0
	zygfryd[id][CSW_DEAGLE] = 0
	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] = 2;
	return FMRES_IGNORED;
}
public kosa(this, idinflictor, idattacker, Float:damage, damagebits)
{
	if(!is_user_connected(idattacker) || !ma_klase[idattacker])
	return HAM_IGNORED
	if(get_user_weapon(idattacker) == CSW_KNIFE && pev(idattacker, pev_button) & IN_ATTACK2)
	{
		SetHamParamFloat(4, float(pev(this, pev_health)))
		return HAM_HANDLED
	}
 
	return HAM_IGNORED;
}
public jedenz(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;
 
	new hp_ofiary = get_user_health(this)
	new bron_atakujacego = get_user_weapon(idattacker)
 
	if (zygfryd[idattacker][bron_atakujacego] > 0)
	{
		if (random_num(1,zygfryd[idattacker][bron_atakujacego]) == 1) cod_inflict_damage(idattacker, this, float(hp_ofiary), 0.0, idinflictor, damagebits);
	}
 
	return HAM_IGNORED;
}
 
public fwPrethink_Niewidzialnosc(id)
{
	if(!ma_klase[id])
	return;
 
	new button = get_user_button(id);
	if( button & IN_DUCK && get_user_weapon(id) == CSW_KNIFE)
	{
		set_rendering(id,kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 50);
	}
	else
	{
		set_rendering(id,kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 255);
	}
}
 

Dodanych wklejek: 12215
Powered By (Pav32) Pastebin © 2011