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 mw5no64sl6ow dodana przez speedkill, 19.06.2012 21:03
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.
216.
217.
218.
219.
220.
221.
222.
223.
224.
225.
226.
227.
228.
229.
230.
231.
232.
233.
234.
235.
236.
237.
238.
239.
240.
241.
242.
243.
244.
245.
246.
247.
248.
249.
250.
251.
252.
253.
254.
255.
256.
257.
258.
259.
260.
261.
262.
263.
264.
265.
266.
267.
268.
269.
270.
271.
272.
273.
274.
275.
276.
277.
278.
279.
280.
281.
282.
283.
284.
285.
286.
287.
288.
289.
290.
291.
292.
293.
294.
295.
296.
297.
298.
299.
300.
301.
302.
303.
304.
305.
306.
307.
308.
309.
310.
311.
312.
313.
314.
315.
316.
317.
/* AMX Mod X script. 
* 
* Admin Screen 3 v1.5 black by caxixi
* 
* Based on Admin Screen by Rav & Admin Screen 2 v1.0 by uTg | bigpapajiggs 
* 
* amx_screen <authid/nick/userid> <number of screens> 
*
*
*
*
*            cvary dopisz do amxx.cfg z wlasnym adresem forum
*
*                              cvary
* amx_screen_forum "www.rzeznia.eu" // adres forum
* amx_screen_ban 1 // 0 - kill 1 -perm obsluga amx_bans, minibans 2- perm bez amxbans
* amx_screen_adminss 1 // 0 - fotki tylko u gracza  1- fotki u gracza i admina
*/ 
 
#include <amxmodx> 
#include <amxmisc> 
 
new koniec
new player
new forum
new adres[51]
new ban_typ
new ban
new fota
new fota_dla_admina
 
//PCVAR 
new maxss, ssinterval, timestamptype
 
public plugin_init() 
{ 
	register_plugin("Admin Screen 3", "1.5", "caxixi") 
	register_concmd("amx_screen", "concmd_screen", ADMIN_LEVEL_A, "<authid, nick or #userid> <screens>")
 
	maxss = register_cvar("amx_maxscreens", "10") 
	ssinterval = register_cvar("amx_ssinterval", "2.0") 
	timestamptype = register_cvar("amx_timestamptype", "3")  
	forum = register_cvar("amx_screen_forum", "www.rzeznia.eu") 
	ban = register_cvar("amx_screen_ban", "1")
	fota = register_cvar("amx_screen_adminss", "1") 
} 
 
// zielony napis
fnGreenChat(plr, const message[], {Float,Sql,Result,_}:... )
{ 
	static max_players, svc_saytext; 
	if( !max_players ) 
		max_players = get_maxplayers( ); 
	if( !svc_saytext ) 
		svc_saytext = get_user_msgid( "SayText" ); 
 
	static msg[192]; 
	msg[0] = 0x04; 
 
	vformat( msg[1], sizeof msg - 2, message, 3 ); 
 
	if( plr > 0 && plr <= max_players ) 
	{ 
		message_begin( MSG_ONE, svc_saytext, { 0, 0, 0 }, plr ); 
		write_byte( plr ); 
		write_string( msg ); 
		message_end( ); 
	} 
	else if( plr == 0 ) 
	{ 
		for( new i = 1 ; i <= max_players ; i++ ) 
		{ 
			if( is_user_connected( i ) ) 
			{ 
				message_begin( MSG_ONE, svc_saytext, { 0, 0, 0 }, i ); 
				write_byte( i ); 
				write_string( msg ); 
				message_end( ); 
			} 
		} 
	} 
 
	return 1; 
}
 
 
 
public concmd_screen(id, level, cid) 
{ 
	//Is the amx_screen'er an admin? 
	if(!cmd_access(id, level, cid, 3)) 
	{ 
		return PLUGIN_HANDLED 
	} 
 
	//Read the arguements 
	new arg1[24], arg2[4] 
	read_argv(1, arg1, 23) 
	read_argv(2, arg2, 3) 
 
 
	new screens = str_to_num(arg2) 
	new maxscreens = get_pcvar_num(maxss) 
 
	//Let us make sure that there aren't too many screenshots taken 
	if(screens > maxscreens) 
	{ 
		console_print(id, "[AMXX] You cannot take that many screenshots!") 
 
		return PLUGIN_HANDLED 
	} 
 
	//Does the target exist? 
	player = cmd_target(id, arg1, 1) 
	if (!player) 
	{ 
		return PLUGIN_HANDLED 
	} 
 
	//How many screenshots? 
	new Float:interval = get_pcvar_float(ssinterval) 
	new array[2] 
	array[0] = id 
	array[1] = player 
	koniec = screens
	// pobranie adresu forum i typu bana
	get_pcvar_string(forum,adres,50)
	ban_typ = get_pcvar_num(ban)
	fota_dla_admina = get_pcvar_num(fota)
	set_task(interval, "takeScreen", 0, array,2, "a", screens) 
 
	return PLUGIN_HANDLED 
} 
 
public takeScreen(array[2]) 
{ 
	new player = array[1] 
	new id = array[0] 
	new ip[16] 
	new SteamID[33]
 
	koniec = koniec - 1
 
	//Get time, admin name, and target name 
	new timestamp[32], name[32], adminname[32] 
	get_time("%m/%d/%Y - %H:%M:%S", timestamp, 31) 
	get_user_name(player, name, 31) 
	get_user_ip(player, ip, 15, 1) 
	get_user_authid(player , SteamID , 32)
	get_user_name(id, adminname, 31) 
 
	//No timestamp 
	if(get_pcvar_num(timestamptype) == 0) 
	{ 
 
		fnGreenChat(player, "** wstaw foty na  %s   player ^"%s^" admin ^"%s^" **",adres, name, adminname)
		fnGreenChat(player, "** moje IP: ^"%s^" | SteamID: ^"%s^" **", ip, SteamID, timestamp)
 
		//Take the screenshot 
		client_cmd(player, "net_graph 3")
		client_cmd(player, "r_norefresh 1") //zatrzymanie odswierzania.
		client_cmd(player, "fps_max 1")
		client_cmd(player, "snapshot") 
		client_cmd(player, "r_norefresh 0") //odblokowanie odswierzania.
		log_to_file("screenlog.txt"," name: ^"%s^" | IP: ^"%s^" | STEAMID: %s | admin: ^"%s^" ^n",name,ip, SteamID, adminname) 
		console_print(id, "[AMXX] FOTY ZOSTALY ZROBIONE POPRAWNIE DLA ^"%s^" | IP: ^"%s^" | STEAMID: ^"%s^" ** ", name, ip, SteamID )
		fnGreenChat(id, "** [AMXX] FOTY ZOSTALY ZROBIONE POPRAWNIE DLA  ^"%s^" | IP: ^"%s^" | STEAMID: ^"%s^" ** ", name, ip, SteamID ) 
	} 
	//Client Print only 
	else if(get_pcvar_num(timestamptype) == 1) 
	{ 
		//info o fotce u gracza
		fnGreenChat(player, "** wstaw foty na  %s  | player ^"%s^" | admin ^"%s^" | (%s) **", adres, name, adminname, timestamp)
		fnGreenChat(player, "** moje IP: ^"%s^" | SteamID: ^"%s^" **", ip, SteamID, timestamp)
		//ustawienie net graph 3
		client_cmd(player, "net_graph 3")
		if(fota_dla_admina == 1)
		{
			client_cmd(id, "net_graph 3")
		}
		// obnizenie fps
		client_cmd(player, "fps_max 1")
		if(fota_dla_admina == 1)
		{
			client_cmd(id, "fps_max 1")
		}
		//zrobienie fotki
		client_cmd(player, "snapshot") 
		if(fota_dla_admina == 1)
		{
			client_cmd(id, "snapshot") 
		}
		// info o fotce u admina
		fnGreenChat(id, "** [AMXX] FOTY ZOSTALY ZROBIONE DLA  ^"%s^" | IP: ^"%s^" | STEAMID: ^"%s^" ** ", name, ip, SteamID )
		console_print(id, "[AMXX] FOTY ZOSTALY ZROBIONE DLA ^"%s^" | IP: ^"%s^" | STEAMID: ^"%s^" ** ", name, ip, SteamID )
		// dodanie wpisu w logach
		log_to_file("screenlog.txt"," name: ^"%s^" | IP: ^"%s^" | STEAMID: %s | admin: ^"%s^" ^n",name,ip, SteamID, adminname)  
	}  
 
 
	//HUD Message only 
	else if(get_pcvar_num(timestamptype) == 2) 
	{ 
		//info o fotce u gracza
		fnGreenChat(player, "** wstaw foty na  %s  | player ^"%s^" | admin ^"%s^" | (%s) **", adres, name, adminname, timestamp)
		fnGreenChat(player, "** moje IP: ^"%s^" | SteamID: ^"%s^" **", ip, SteamID, timestamp)
 
 
		//ustawienie net graph 3
		client_cmd(player, "net_graph 3")
		if(fota_dla_admina == 1)
		{
			client_cmd(id, "net_graph 3")
		}
		// obnizenie fps
		client_cmd(player, "fps_max 1")
		if(fota_dla_admina == 1)
		{
			client_cmd(id, "fps_max 1")
		}
		//zrobienie fotki
		client_cmd(player, "snapshot") 
		if(fota_dla_admina == 1)
		{
			client_cmd(id, "snapshot") 
		}
		// info o fotce u admina
		fnGreenChat(id, "** [AMXX] FOTY ZOSTALY ZROBIONE DLA  ^"%s^" | IP: ^"%s^" | STEAMID: ^"%s^" ** ", name, ip, SteamID )
		console_print(id, "[AMXX] FOTY ZOSTALY ZROBIONE DLA ^"%s^" | IP: ^"%s^" | STEAMID: ^"%s^" ** ", name, ip, SteamID )
		// dodanie wpisu w logach
		log_to_file("screenlog.txt"," name: ^"%s^" | IP: ^"%s^" | STEAMID: %s | admin: ^"%s^" ^n",name,ip, SteamID, adminname)  
	}
 
 
 
 
 
	//Both 
	else if(get_pcvar_num(timestamptype) == 3) 
	{ 
 
		//info o fotce u gracza
		fnGreenChat(player, "** wstaw foty na  %s  | player ^"%s^" | admin ^"%s^" | (%s) **", adres, name, adminname, timestamp)
		fnGreenChat(player, "** moje IP: ^"%s^" | SteamID: ^"%s^" **", ip, SteamID, timestamp)
 
 
		//ustawienie net graph 3
		client_cmd(player, "net_graph 3")
		if(fota_dla_admina == 1)
		{
			client_cmd(id, "net_graph 3")
		}
 
		// obnizenie fps
		client_cmd(player, "fps_max 1")
		if(fota_dla_admina == 1)
		{
			client_cmd(id, "fps_max 1")
		}
 
		//zrobienie fotki
		client_cmd(player, "snapshot") 
		if(fota_dla_admina == 1)
		{
			client_cmd(id, "snapshot") 
		}
 
		// info o fotce u admina
		fnGreenChat(id, "** [AMXX] FOTY ZOSTALY ZROBIONE DLA  ^"%s^" | IP: ^"%s^" | STEAMID: ^"%s^" ** ", name, ip, SteamID )
		console_print(id, "[AMXX] FOTY ZOSTALY ZROBIONE DLA ^"%s^" | IP: ^"%s^" | STEAMID: ^"%s^" ** ", name, ip, SteamID )
 
		// dodanie wpisu w logach
		log_to_file("screenlog.txt"," name: ^"%s^" | IP: ^"%s^" | STEAMID: %s | admin: ^"%s^" ^n",name,ip, SteamID, adminname)  
	} 
 
 
 
 
	if(koniec == 0)
	{
 
		// fps na 101
		client_cmd(player, "fps_max 101")
		if(fota_dla_admina == 1)
		{
			client_cmd(id, "fps_max 101")
		}
 
 
		// info w konsoli gracza
		console_print(player, "********************************************************")
		console_print(player, "** Admin ^"%s^" z powodu podejrzen o oszustwo zrobil Ci screeny **",adminname)
		console_print(player, "** Screeny znajdziesz w katalogi cstrike/cstrike_polish                     **")
		console_print(player, "** W celu odbanowania koniecznie wrzuc je na %s                 **", adres)
		console_print(player, "********************************************************")
 
		// co ma robic
		if(ban_typ == 0)
		{
			client_cmd(player, "kill")
		}
 
		else if(ban_typ == 1)
		{
			client_cmd(id, "amx_ban 0 ^"%s^" ^"wstaw foty na %s ^" ", name, adres)
		}
 
		else if(ban_typ == 2)
		{
			client_cmd(id, "amx_banip ^"%s^" 0 ^"wstaw foty na %s ^" ", name, adres)
		}
 
	}
 
	return PLUGIN_CONTINUE 
} 
 

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