offok törölve.
ini fájl neve: hirdetesek.ini helye: configs mappa.
- /* Plugin generated by AMXX-Studio */ 
-   
- #include <amxmodx> 
- #include <amxmisc> 
- #include <colorchat> 
-   
- #define PLUGIN "Hirdeto" 
- #define VERSION "1.0" 
- #define AUTHOR "CrB" 
-   
-   
- public plugin_init() { 
- 	register_plugin(PLUGIN, VERSION, AUTHOR) 
-   
- 	set_task(10.0, "hirdeto",_,_,_,"b") 
- } 
- public hirdeto(id) 
- { 
- 	new file[192] 
- 	new jog[8], uzi[192], szin[8] 
- 	formatex(file, charsmax(file), "addons/amxmodx/configs/hirdetesek.ini") 
- 	new sorok = file_size(file, 1) 
- 	if(sorok > 0) 
- 	{ 
- 		new randomsor = random(sorok); 
- 		new buff[256], len; 
- 		read_file(file, randomsor, buff, charsmax(buff), len);	 
- 		parse(buff, jog, 7, szin, 7, uzi, 191) 
-   
- 		if(equal(jog, "p")) 
- 		{ 
-   
- 			if(equali(szin, "green")) 
- 				ColorChat(0, GREEN, "%s", uzi) 
- 			else if(equali(szin, "grey"))  
- 				ColorChat(0, GREY, "%s", uzi) 
- 			else if(equali(szin, "red"))  
- 				ColorChat(0, RED, "%s", uzi) 
- 			else if(equali(szin, "blue"))  
- 				ColorChat(0, BLUE, "%s", uzi) 
- 			else if(equali(szin, "normal"))  
- 				ColorChat(0, NORMAL, "%s", uzi) 
-   
-   
- 		} 
-   
-   
- 		if(equal(jog, "a")) 
- 		{ 
- 			for(new i=1; i<=get_maxplayers(); i++) 
- 			{ 
- 				new aid = i 
- 				if(get_user_flags(aid) & ADMIN_KICK) 
- 				{ 
- 					if(equali(szin, "green")) 
- 						ColorChat(aid, GREEN, "%s", uzi) 
- 					else if(equali(szin, "grey"))  
- 						ColorChat(aid, GREY, "%s", uzi) 
- 					else if(equali(szin, "red"))  
- 						ColorChat(aid, RED, "%s", uzi) 
- 					else if(equali(szin, "blue"))  
- 						ColorChat(aid, BLUE, "%s", uzi) 
- 					else if(equali(szin, "normal"))  
- 						ColorChat(aid, NORMAL, "%s", uzi) 
- 				} 
- 			} 
- 		} 
-   
-   
- 	} 
- } 
-