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 1cq3f2zjofnog dodana przez speedkill, 14.08.2012 13:20
Typ:



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.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
124.
125.
126.
127.
128.
129.
130.
131.
132.
133.
134.
135.
136.
137.
138.
139.
140.
141.
142.
143.
144.
145.
146.
147.
148.
149.
150.
151.
152.
153.
154.
155.
156.
157.
158.
159.
160.
161.
162.
163.
164.
165.
166.
167.
168.
169.
170.
171.
172.
173.
174.
175.
176.
177.
178.
179.
180.
181.
182.
183.
184.
185.
186.
187.
188.
189.
190.
191.
192.
193.
194.
195.
196.
197.
198.
199.
200.
201.
202.
203.
204.
205.
206.
207.
208.
209.
210.
211.
212.
213.
214.
215.
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <colorchat>
 
 
#define PLUGIN "Free_OnlyKnife"
#define VERSION "1.0"
#define AUTHOR "G[o]Q & R3X"
 
new is_free
new uzycia
new only_knife
new light
new smoke
 
new czy_uzyty[513]
 
new to_block[]={"cl_rebuy","cl_autobuy","cl_setautobuy","rebuy","autobuy","glock","usp","p228","deagle","elites",
	"fn57","m3","autoshotgun","mac10","tmp","mp5","ump45","p90","galil","ak47","scout","sg552","awp",
"g3sg1","famas","m4a1","bullpup","sg550","m249","shield","hegren","sgren","flash",}
 
public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_cvar("dr_thunder","1")
	register_cvar("dr_auto_resp","1")
 
	for(new i=0;i<sizeof(to_block);i++)
		register_clcmd( to_block[i],"BlokujKomende");
 
	register_clcmd("say free","free_run")
	register_clcmd("say /free","free_run")
	register_clcmd("sayteam free","free_run")
	register_clcmd("sayteam /free","free_run")
 
	RegisterHam(Ham_Touch, "weaponbox", "Bron");
	RegisterHam(Ham_Touch, "armoury_entity", "Bron")
	RegisterHam(Ham_Touch, "weapon_shield", "Bron")
 
	register_clcmd("say /respawn","g_Respawn")
 
	RegisterHam(Ham_Touch,"trigger_hurt","podloze_post",0)
 
	RegisterHam(Ham_Use, "func_button","Dotyk_buttona");
	RegisterHam(Ham_Use, "func_rot_button","Dotyk_buttona");
	RegisterHam(Ham_Use, "button_target","Dotyk_buttona");
 
	register_event("CurWeapon","curweapon","be","1=1")
	register_event("DeathMsg", "death", "a")
 
 
	register_logevent( "round_start", 2, "0=World triggered", "1=Round_Start");
 
	set_task(300.0,"reklama",0,_,_,"b")
}
 
public reklama(){
	ColorChat(0,GREEN, "[FREE]^x01 Jesli jestes w terro wpisz free lub /free aby uruchomic Freerun");
}
public free_run(id){
	if(get_user_team(id)!=1){
		ColorChat(id,GREEN, "[FREE]^x01 Komenda Dostepna Tylko Dla Terrorystow");
		return PLUGIN_HANDLED
	}
	if(is_free){
		ColorChat(id,GREEN, "[FREE]^x01 Free zostalo juz aktywowane!");
		return PLUGIN_HANDLED
	}
	if(!uzycia){
		set_hudmessage(255, 42, 255, 0.01, 0.46, 1, 6.0, 5.0)
		show_hudmessage(0, "FREE!")
		is_free=1
		only_knife=1
		set_cvar_num("dr_auto_resp",1)
		for(new i=1;i<33;i++){
			if(!is_user_alive(i)) continue
			engclient_cmd(i,"weapon_knife")
			client_cmd(i,"weapon_knife")
		}
	}
	else ColorChat(id,GREEN, "[FREE]^x01 Pulapka Zostala Juz Uzyta!");
	return PLUGIN_HANDLED
}
public curweapon(id){
	if(only_knife){
		engclient_cmd(id,"weapon_knife")
		client_cmd(id,"weapon_knife")
	}
}
public Dotyk_buttona(this, idcaller, idactivator, use_type, Float:value){
 
	if(!is_free&&!czy_uzyty[this]&&(get_user_team(idcaller)==1||get_user_team(idactivator)==1)){
		++uzycia
		czy_uzyty[this]=1
		return HAM_IGNORED
	}
	if(!is_free&&czy_uzyty[this]&&(get_user_team(idcaller)==1||get_user_team(idactivator)==1)){
 
		ColorChat(idcaller,GREEN, "[FREE]^x01 Ten przycisk zostal juz uzyty!");
		return HAM_SUPERCEDE
	}
 
	if(is_free&&(get_user_team(idcaller)==1||get_user_team(idactivator)==1)){
		ColorChat(idcaller,GREEN, "[FREE]^x01 Podczas Free Nie Mozesz aktywowac Pulapek!");
		return HAM_SUPERCEDE;
	}
	return HAM_IGNORED;
 
 
}
 
public round_start(){
	set_cvar_num("dr_auto_resp",0)
	is_free=0
	uzycia=0
	only_knife=0
	for(new i=0;i<513;i++) czy_uzyty[i]=0
 
 
}
public BlokujKomende()
	return PLUGIN_HANDLED;
 
public Bron(weapon,id){
	if(!is_user_alive(id)) return HAM_IGNORED
	if (get_user_team(id)==2&&!is_free)
		return HAM_IGNORED;
	return HAM_SUPERCEDE;
}
public podloze_post(ent,id){
	if(!is_user_connected(id)) return HAM_IGNORED
	if (get_user_team(id)==1)
		return HAM_IGNORED;
	if(!get_cvar_num("dr_thunder"))
		return HAM_IGNORED
	thunder(id)
 
	return HAM_IGNORED
}
public thunder(id){
 
	if ( is_user_alive( id ) )
	{
		new origin[ 3 ]
		get_user_origin( id, origin )
		origin[ 2 ] = origin[ 2 ] - 26
 
		message_begin( MSG_BROADCAST, SVC_TEMPENTITY ) // Lightning
		write_byte( TE_BEAMPOINTS )
		write_coord( origin[ 0 ] )
		write_coord( origin[ 1 ] )
		write_coord( origin[ 2 ] )
		write_coord( origin[ 0 ] + 150 )
		write_coord( origin[ 1 ] + 150 )
		write_coord( origin[ 2 ] + 1700 )
		write_short(light )
		write_byte( 1 )
		write_byte( 5 )
		write_byte( 14 )
		write_byte( 50 )
		write_byte( 50 )
		write_byte( 255 )
		write_byte( 100 )
		write_byte( 20 )
		write_byte( 200 )
		write_byte( 200 )
		message_end()
 
		message_begin( MSG_PVS, SVC_TEMPENTITY, origin ) // Sparks
		write_byte( TE_SPARKS )
		write_coord( origin[ 0 ] )
		write_coord( origin[ 1 ] )
		write_coord( origin[ 2 ] )
		message_end()
 
		smoke_effect( origin, 100 ) // Smoke
		emit_sound( id, CHAN_AUTO, "ambience/thunder_clap.wav", 1.0, ATTN_NORM, 0, PITCH_NORM )
		user_kill(id, 1)
	}
 
 
}
 
public smoke_effect( origin[ 3 ], amount )
{
	message_begin( MSG_BROADCAST, SVC_TEMPENTITY )
	write_byte( TE_SMOKE )
	write_coord( origin[ 0 ] )
	write_coord( origin[ 1 ] )
	write_coord( origin[ 2 ] )
	write_short( smoke )
	write_byte( amount )
	write_byte( 10 )
	message_end()
}
public plugin_precache()
{
	precache_sound( "ambience/thunder_clap.wav" )
	smoke = precache_model( "sprites/steam1.spr" )
	light = precache_model( "sprites/lgtning.spr" )
}
public respawn(id)
	ExecuteHam(Ham_CS_RoundRespawn,id) 
 
public death(){
	new vid = read_data(2)
	if(get_cvar_num("dr_auto_resp")==1&&get_user_team(vid)==2)
		set_task(0.2,"respawn",vid)
}
public g_Respawn(id)
{
	if(!is_user_alive(id) && get_cvar_num("dr_auto_resp")==1)
		set_task(0.1,"respawn",id)
}
 

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