- /* Plugin generated by AMXX-Studio */ 
-   
- #include <amxmodx> 
- #include <fun> 
- #include <cstrike> 
- #include <engine> 
-   
- #define PLUGIN "Advanced Resetscore" 
- #define VERSION "1.0" 
- #define AUTHOR "Silent" 
-   
- #define USE_CC 1 
-   
- #if defined USE_CC 
- 	#include <colorchat> 
- #endif 
-   
- #define ADMIN_NEED ADMIN_KICK 
-   
- new cvar_enable; 
-   
- new cvar_showall, cvar_showalladmin; 
- new cvar_log, cvar_logadmin; 
-   
- public plugin_init() { 
- 	register_plugin(PLUGIN, VERSION, AUTHOR); 
-   
- 	cvar_enable = register_cvar("ars_enable", "1"); 
- 	cvar_showall = register_cvar("ars_showall", "0"); 
- 	cvar_showalladmin = register_cvar("ars_showall_admin", "1"); 
- 	cvar_log = register_cvar("ars_log", "0"); 
- 	cvar_logadmin = register_cvar("ars_log_admin", "1"); 
-   
- 	register_clcmd("say /rs", "resetscore_player"); 
- 	register_clcmd("say /resetscore", "resetscore_player"); 
- 	register_clcmd("say !rs", "resetscore_player"); 
- 	register_clcmd("say !resetscore", "resetscore_player"); 
- 	register_clcmd("resetscore", "resetscore_player"); 
-   
- 	register_clcmd("amx_resetscore", "resetscore_admin"); 
- 	register_clcmd("say amx_resetscore", "resetscore_admin"); 
- } 
-   
- public resetscore_player(id) 
- { 
- 	if(!get_pcvar_num(cvar_enable)) 
- 	return PLUGIN_CONTINUE; 
-   
- 	if(!is_user_connected(id)) 
- 	return PLUGIN_HANDLED; 
-   
- 	set_user_frags(id, 0); 
- 	cs_set_user_deaths(id, 0); 
- 	set_user_frags(id, 0); 
- 	cs_set_user_deaths(id, 0); 
-   
- 	new name[32]; get_user_name(id, name, 31); 
-   
- 	if(get_pcvar_num(cvar_showall)) 
- 	{ 
- 		#if defined USE_CC 
- 			ColorChat(0, BLUE, "[AdvancedRS]^x03 %s^x04 nullazta a statisztikajat.", name); 
- 		#else 
- 			client_print(0, print_chat, "%s nullazta a statisztikajat.", name); 
- 		#endif 
- 	} 
- 	else 
- 	{ 
- 		#if defined USE_CC 
- 			ColorChat(id, BLUE, "[AdvancedRS]^x04 Sikeresen nullaztad a statisztikadat."); 
- 		#else 
- 			client_print(id, print_chat, "Sikeresen nullaztad a statisztikadat."); 
- 		#endif 
- 	} 
-   
- 	if(get_pcvar_num(cvar_log)) 
- 	{ 
- 		log_amx("%s nullazta a statisztikajat", name); 
- 	} 
- 	return PLUGIN_HANDLED; 
- } 
-   
- public resetscore_admin(id) 
- { 
- 	if(!get_pcvar_num(cvar_enable)) 
- 	return PLUGIN_CONTINUE; 
-   
- 	if(!is_user_connected(id)) 
- 	return PLUGIN_HANDLED; 
-   
- 	if(!(get_user_flags(id) & ADMIN_NEED)) 
- 	return PLUGIN_HANDLED; 
-   
- 	new menu = menu_create("\rValaszd ki a jatekost:", "menu_handler"); 
- 	new players[32], pnum, tempid; 
- 	new szName[32], szTempid[10]; 
- 	get_players(players, pnum); 
- 	for( new i; i<pnum; i++ ) 
- 	{ 
- 		tempid = players[i]; 
- 		get_user_name(tempid, szName, charsmax(szName)); 
- 		num_to_str(tempid, szTempid, charsmax(szTempid)); 
- 		menu_additem(menu, szName, szTempid, 0); 
- 	} 
- 	menu_display(id, menu, 0); 
-   
-   
-   
-   
-   
-   
- 	return PLUGIN_HANDLED; 
- } 
-   
-   
-   
-   
-   
- public menu_handler(id, menu, item) 
- { 
- 	if(item == MENU_EXIT) 
- 	{ 
- 		menu_destroy(menu); 
- 		return PLUGIN_HANDLED; 
- 	} 
- 	new data[6], szName[64]; 
- 	new access, callback; 
- 	menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback); 
- 	new tempid = str_to_num(data); 
- 	if(is_user_connected(tempid)) 
- 	{ 
- 		set_user_frags(tempid, 0); 
- 		cs_set_user_deaths(tempid, 0); 
- 		set_user_frags(tempid, 0); 
- 		cs_set_user_deaths(tempid, 0); 
-   
- 		new name[32], tempname[32]; get_user_name(id, name, 31); get_user_name(tempid, tempname, 31); 
-   
- 		if(get_pcvar_num(cvar_showalladmin)) 
- 		{ 
- 			#if defined USE_CC 
- 				ColorChat(0, GREEN, "[AdvancedRS]^x03 %s^x04 nullazta ^x03%s^x04 statisztikajat.", name, tempname); 
- 			#else 
- 				client_print(0, print_chat, "[AdvancedRS] %s nullazta %s statisztikajat.", name, tempname); 
- 			#endif 
- 		} 
- 		else 
- 		{ 
- 			#if defined USE_CC 
- 				ColorChat(id, BLUE, "[AdvancedRS]^x04 Sikeresen nullaztad ^x03%s^x04 statisztikajat.", tempname); 
- 				ColorChat(tempid, BLUE, "AdvancedRS]^x03 %s^x04 nullazta a statisztikadat.", name); 
- 			#else 
- 				client_print(id, print_chat, "[AdvancedRS] Sikeresen nullaztad %s statisztikajat.", tempname); 
- 				client_print(tempid, print_chat, "[AdvancedRS] %s nullazta a statisztikadat.", name); 
- 			#endif 
- 		} 
-   
- 		if(get_pcvar_num(cvar_logadmin)) 
- 		{ 
- 			log_amx("%s admin nullazta %s jatekos statisztikajat.", name, tempname); 
- 		} 
- 	} 
- 	menu_destroy(menu); 
- 	return PLUGIN_HANDLED; 
- } 
- /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE 
- *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1038\\ f0\\ fs16 \n\\ par } 
- */ 
-