←  Dodatki

AMXX.pl: Support AMX Mod X i SourceMod

»
Wklejka 13373698210 dodana przez Gość, 18.05.2012 20:37
Typ:


13373698210
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.
#include <amxmodx>
#include <amxmisc>
#include <codmod>
#include <engine>
#include <hamsandwich>
#include <fun>
 
new const nazwa[]   = "Trup";
new const opis[]    = "Posiada nóż i jest niewidzialny.";
new const bronie    = 0;
new const zdrowie   = 10;
new const kondycja  = 25;
new const inteligencja = -5;
new const wytrzymalosc = 10;
 
new ma_klase[33];
 
public plugin_init()
{
	register_plugin(nazwa, "1.0", "amxx.pl");
	cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);  
	RegisterHam(Ham_Spawn, "player", "fwSpawn_Grawitacja", 1);
	RegisterHam(Ham_Spawn, "player", "Spawn", 1);
}
 
public cod_class_enabled(id)
{
	set_rendering(id,kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 25);
	entity_set_float(id, EV_FL_gravity, 300.0/800.0);
	ma_klase[id] = true;
}
 
public cod_class_disabled(id)
{
	set_rendering(id,kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 255);
 
	entity_set_float(id, EV_FL_gravity, 1.0);
	ma_klase[id] = false;
}
 
public fwSpawn_Grawitacja(id)
{
	if(ma_klase[id])
		entity_set_float(id, EV_FL_gravity, 300.0/800.0);
}
 
public Spawn(id)
{
	if(ma_klase[id])
	{
		strip_user_weapons(id);
		give_item(id, "weapon_knife");
	}
}