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 129977824910511 dodana przez Karpielek, 10.03.2011 18:30
Typ:


129977824910511
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.
/* Plugin generated by AMXX-Studio */
 
#include <amxmodx>
#include <amxmisc>
#include <colorchat>
 
#define PLUGIN "Simple Account Maker"
#define VERSION "1.0"
#define AUTHOR "G[o]Q"
 
#define Keys (1<<0)|(1<<1)
#define Keysheadmenu (1<<0)|(1<<1)|(1<<2)|(1<<4)|(1<<9)
#define Keysadmin (1<<0)|(1<<1)|(1<<2)|(1<<9) // Keys: 1230
 
 
public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
 
	register_menucmd(register_menuid("admin"), Keysadmin, "Pressedadmin")
	register_menucmd(register_menuid("headmenu"), Keysheadmenu, "Pressedheadmenu")
	register_menucmd(register_menuid("delete"), Keys, "Presseddelete")
	register_menucmd(register_menuid("edit"), Keys, "Pressededit")
 
	register_concmd("haslo","rejestruj",-1," ");
	register_concmd("usun","usun_one",ADMIN_IMMUNITY," ");
	register_clcmd("say /konto","Showheadmenu")
 
	set_task(300.0,"pokaz",0,_,_,"b")
 
}
public rejestruj(id,level,cid){
	new haslo[32];
	read_argv(1, haslo, 31);
 
	if (sprawdz(id)) istnieje(id)
	else create(id,haslo)
 
	return PLUGIN_HANDLED
}
public mesmode(id){
	if (!sprawdz(id))
		console_cmd(id,"messagemode haslo")	
	else ColorChat(id, TEAM_COLOR,"[SAM]^x04 Konto dla tego nicku juz istnieje !!!")
 
	return PLUGIN_HANDLED;
}
public sprawdz(id){
	new name[32];
	new linijka=0,text[128],chars
	static configdir[64],plik[128]
	new nick[32]
	get_user_name(id,name,31)
	get_configsdir(configdir,63)
	formatex(plik,127,"%s/users.ini",configdir)
 
 
	do{
		linijka = read_file(plik,linijka,text,127,chars)
		if((text[0]==';') || !chars) continue 
		parse(text, nick,31)
		if (equali(name,nick)) return 1
	}
	while(linijka!=0)
	return 0
}
public istnieje(id){
	ColorChat(id, TEAM_COLOR,"[SAM]^x04 Konto dla tego nicku juz istnieje !!!")
	return PLUGIN_HANDLED
}
public usun(id){
 
	new name[32],text[128],chars ,nick[32]
	new linijka=0
	static configdir[64],plik[128]
 
	get_user_name(id,name,31)
	get_configsdir(configdir,63)
	formatex(plik,127,"%s/users.ini",configdir)
	do{
		linijka = read_file(plik,linijka,text,127,chars)
		if((text[0]==';') || !chars) continue 
		parse(text, nick,31)
		if (equali(name,nick)) break 
	}
	while(linijka!=0)
	write_file(plik,"",linijka-1)
	return PLUGIN_CONTINUE
}
public create(id,pass[32]){
	new wpis[128]
	new nick[32];
	static configdir[64],plik[128]
	get_user_name(id,nick,31)
	if (equal(pass,"")) return PLUGIN_HANDLED
	format(wpis,127,"^"%s^" ^"%s^" ^"z^" ^"a^"",nick,pass)
	get_configsdir(configdir,63)
	formatex(plik,127,"%s/users.ini",configdir)
	write_file(plik,wpis,-1)
 
 
	ColorChat(id, GREEN,"[SAM]^x03 HASLO ZOSTALO ZAPISANE")
	ColorChat(id, GREEN,"[SAM]^x01 HASLO:^x04 %s",pass)
	ColorChat(id, GREEN,"[SAM]^x01 Aby wejsc na server wpisz w consoli:^x03 setinfo _pw ^"^x04%s^x03^"",pass)
 
	client_print(id,print_console,"~*~ HASLO ZOSTALO ZAPISANE")
	client_print(id,print_console,"~*~ HASLO :%s",pass)
	client_print(id,print_console,"~*~ Aby wejsc na server wpisz w consoli: setinfo _pw ^"%s^"",pass)
 
	return PLUGIN_CONTINUE
}
public edytuj(id){
	usun(id)
	mesmode(id)
}
 
public pokaz(){
	ColorChat(0, TEAM_COLOR,"[SAM]^x04 Nie chcesz aby ktos gral na twoim nicku? zaloz konto wpisujac: ^x03 /konto")
}
 
public Showdelete(id) {
	if (!sprawdz(id)){
		ColorChat(id, TEAM_COLOR,"[SAM]^x04 Konto dla tego nicku nie istnieje !!!")
		return PLUGIN_HANDLED
	}
	else show_menu(id, Keys, "\rCzy napewno chcesz usunac ?^n\w1: \rTAK^n\w2: NIE^n", -1, "delete") 
	return PLUGIN_CONTINUE
}
 
public Presseddelete(id, key) {
	if (key==0){
		usun(id)
		ColorChat(id, TEAM_COLOR,"[SAM]^x04 Rezerwacja zostala usunieta !!!")
		return PLUGIN_CONTINUE
	}
	return PLUGIN_CONTINUE
}
public Showedit(id) {
	if (!sprawdz(id)){
		ColorChat(id,TEAM_COLOR,"[SAM]^x04 Konto dla tego nicku nie istnieje !!!")
		return PLUGIN_HANDLED
	}
	else show_menu(id, Keys, "\rCzy napewno chcesz zmienic haslo?^n\w1: \rTAK^n\w2: NIE^n", -1, "edit") 
	return PLUGIN_CONTINUE
}
 
public Pressededit(id, key) {
	if (key==0){
		edytuj(id)
		ColorChat(id, TEAM_COLOR,"[SAM]^x04 Wpis zostal zaktualizowany !!!")
		return PLUGIN_CONTINUE
	}
	return PLUGIN_CONTINUE
}
 
public Showheadmenu(id) {
	new name[32]
	new menutext[256]
	get_user_name(id,name,31)
	new keyss=(get_user_flags(id)&ADMIN_IMMUNITY)?((1<<0)|(1<<1)|(1<<2)|(1<<4)|(1<<9)):((1<<0)|(1<<1)|(1<<2)|(1<<9))
	format(menutext,255,"\rMenu \y(konto %s)\r:^n\y1: \w Dodaj rezerwacje^n\y2: \w Usun rezerwacje^n\y3: \w Edytuj rezerwacje^n^n%s5: \w Menu Admina^n^n^n^n\y0:\w Wyjscie",name,(get_user_flags(id)& ADMIN_IMMUNITY)?"\y":"\d" ) 
	show_menu(id, keyss,menutext, -1, "headmenu") 
}
 
public Pressedheadmenu(id, key) {
 
	switch (key) {
		case 0: { // 1
			mesmode(id)
		}
		case 1: { // 2
			Showdelete(id)
		}
		case 2: { // 3
			Showedit(id)
		}
		case 4:{
			Showadmin(id)
		}
	}
}
public usun_all(id){
 
	new text[128],chars ,nick[32],haslo[32],flagi[32],flagi2[32]
	new linijka=0
	static configdir[64],plik[128]
	get_configsdir(configdir,63)
	formatex(plik,127,"%s/users.ini",configdir)
	do{
		linijka = read_file(plik,linijka,text,127,chars)
		if((text[0]==';') || !chars) continue 
		parse(text, nick,31,haslo,31,flagi,31,flagi2,31)
		if (equali(flagi,"z")) write_file(plik,"",linijka-1)
	}
	while(linijka!=0)
 
	return PLUGIN_CONTINUE
}
public sprawdz2(name[]){
 
 
	new linijka=0,text[128],chars
	static configdir[64],plik[128]
	new nick[32]
 
	get_configsdir(configdir,63)
	formatex(plik,127,"%s/users.ini",configdir)
 
 
	do{
		linijka = read_file(plik,linijka,text,127,chars)
		if((text[0]==';') || !chars) continue 
		parse(text, nick,31)
		if (equali(name,nick)) return 1
	}
	while(linijka!=0)
	return 0
 
}
public usun_one(id,level,cid){
	new name[32];
	read_argv(1, name, 31);
 
	if (!sprawdz2(name)){
		ColorChat(id, TEAM_COLOR,"[SAM]^x04 Konto dla tego nicku nie istnieje !!!")
		return PLUGIN_HANDLED
	}
	usun_1(id,name)
 
	return PLUGIN_HANDLED
}
public mesdel(id){
	console_cmd(id,"messagemode usun")	
	return PLUGIN_HANDLED;
}
public usun_1(id,name[32]){
	new text[128],chars ,nick[32]
	new linijka=0
	static configdir[64],plik[128]
	get_configsdir(configdir,63)
	formatex(plik,127,"%s/users.ini",configdir)
	do{
		linijka = read_file(plik,linijka,text,127,chars)
		if((text[0]==';') || !chars) continue 
		parse(text, nick,31)
		if (equal(name,nick)){
			write_file(plik,"",linijka-1)
			break
		}
	}
	while(linijka!=0)
	ColorChat(id, TEAM_COLOR,"[SAM]^x04 Konto dla tego nicku zostalo usuniete !!!")
}
public poka_all(id){
	new text[128],chars ,nick[32],haslo[32],flagi[32],flagi2[32],spis[1024]
	new linijka=0
	static configdir[64],plik[128]
	get_configsdir(configdir,63)
	format(plik,127,"%s/users.ini",configdir)
	format(spis,1023,"<html><body background=^"http://amxx.pl/uploads/images/amxx.pl-1271592209-U6279.png^">")
	format(spis,1023,"%s <center><table border=^"1^" style=^"margin: auto; border-style: solid; border-color: black; border-width: 1px; border-collapse: collapse^"><tbody><tr>",spis)
	format(spis,1023,"%s <td width=^" 200^" style=^"background-color: blue; color: white; text-align: center^">Nick</td>",spis)
	format(spis,1023,"%s <td width=^" 200^" style=^"background-color: blue; color: white; text-align: center^">Haslo</td>",spis)
	format(spis,1023,"%s <td width=^" 200^" style=^"background-color: blue; color: white; text-align: center^">Flagi</td></tr>",spis)
	do{
		linijka = read_file(plik,linijka,text,127,chars)
		if((text[0]==';') || !chars) continue 
		parse(text, nick,31,haslo,31,flagi,31,flagi2,31)
		if (equal(flagi,"z")&&linijka!=0){
 
			format(spis,1023,"%s <tr> <td style=^"color: white; text-align: center^">%s</td>",spis,nick)
			format(spis,1023,"%s <td style=^"color: white; text-align: center^">%s</td><td style=^"color: white; text-align: center^">%s</td></tr>",spis,haslo,flagi)
 
		}
 
	}
	while(linijka!=0)
	format(spis,1023,"%s </tbody> </table></center></body><html>",spis)
	show_motd(id,spis,"KONTA GRACZY")
	return PLUGIN_CONTINUE	
}
 
public Showadmin(id) {
	show_menu(id, Keysadmin, "\rMenu admina:^n\y1: \wUsun wszystkie rezerwacje^n\y2: \wUsun jedna rezerwacje^n\y3: \wPokaz wszystkie rezerwacje^n\y^n^n^n^n0: W\wyjscie^n", -1, "admin") // Display menu
}
 
public Pressedadmin(id, key) {
 
	switch (key) {
		case 0: { // 1
			usun_all(id)
		}
		case 1: { // 2
			mesdel(id)
		}
		case 2: { // 3
			poka_all(id)
		}
 
	}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par }
*/