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 12998718999647 dodana przez AmD, 11.03.2011 20:31
Typ:


AmD
12998718999647
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.
/* Plugin generated by AMXX-Studio */
 
#include <amxmodx>
#include <amxmisc>
#include <engine>
 
 
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
#define DROPED 1
#define ITAG "INFO"
 
new info[8]
 
public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
 
	ent_garbage_collector()
}
stock ent_kill(id) {
 
    entity_set_int(id, EV_INT_flags, (entity_get_int(id, EV_INT_flags) | FL_KILLME))
 
}
public ent_garbage_collector() {
 
	new wprefix[] = "weapon_", class[32]
	new wbox, wbox_class[] = "weaponbox"
	new startent = get_maxplayers() + 1
	new endent = get_global_int(GL_maxEntities)
	new j = 0
 
	for (new i = startent; i <= endent; i++) {
		if (!is_valid_ent(i))
			continue
 
		entity_get_string(i, EV_SZ_classname, class, 31)
 
		if (equal(class, "weapon_shield") || equal(class, "item_thighpack") || equal(class, "item_assaultsuit")) {
			ent_kill(i)
			j++
			continue
		}
 
		if (contain(class, wprefix) != -1) {
 
			wbox = entity_get_edict(i, EV_ENT_owner)
			if (wbox < startent || !is_valid_ent(wbox))
				continue
 
			entity_get_string(wbox, EV_SZ_classname, class, 31)
			if (contain(class, wbox_class) != -1) {
				ent_kill(wbox)
				ent_kill(i)
				j += 2
			}
		}
	}
	info[DROPED] += j
	if (j)
		client_print(0, print_chat, "[%s] %d entities removed (total %d)", ITAG, j, info[DROPED])
 
}