- #include <amxmodx>  
- #include <hamsandwich>  
- #include <cstrike> 
- #include <fun> 
- #include <colorchat> 
-   
- #define PLUGIN "Fegyver Menu" 
- #define VERSION "1.0" 
- #define AUTHOR "Szemir"  
-   
-   
- new awp = 0; 
-   
- public plugin_init()   
- {  
- 	register_plugin(PLUGIN, VERSION, AUTHOR) 
- 	RegisterHam(Ham_Spawn, "player", "JatekosEledes", true);  
- }  
-   
- public JatekosEledes(id)  
- {  
- 	if( is_user_alive(id) )  
- 	{  
- 		Fegyvermenu(id);  
- 	}  
- }  
-   
- public Fegyvermenu(id)  
- {  
- 	new iMenu = menu_create("\yVálassz fegyvert:", "MainMenu_Handle");  
-   
- 	menu_additem(iMenu, "\rM4A1 \yCsomag", "1");  
- 	menu_additem(iMenu, "\rAK47 \yCsomag", "2");  
- 	menu_additem(iMenu, "\rAWP \yCsomag \w(Első 4 embernek)", "3"); 
- 	menu_additem(iMenu, "\rScout \yCsomag", "4"); 
- 	menu_additem(iMenu, "\rKrieg \yCsomag", "5"); 
- 	menu_additem(iMenu, "\rFamas \yCsomag", "6"); 
- 	menu_additem(iMenu, "\rShoti \yCsomag", "7"); 
- 	menu_additem(iMenu, "\rAug \yCsomag", "8"); 
- 	menu_additem(iMenu, "\rSMG \yCsomag", "9"); 
- 	menu_additem(iMenu, "\rGalil \yCsomag", "10"); 
- 	menu_additem(iMenu, "\rMachineguns \yCsomag", "11"); 
-   
- 	menu_display(id, iMenu);  
- }  
-   
- public MainMenu_Handle(id, iMenu, iItem)  
- {  
- 	if( iItem == MENU_EXIT )  
- 	{  
- 		menu_destroy(iMenu);  
- 		return PLUGIN_HANDLED;  
- 	}  
-   
- 	new iAccess, iCallback, szData[5];  
- 	menu_item_getinfo(iMenu, iItem, iAccess, szData, charsmax(szData), _, _, iCallback);  
-   
- 	switch( str_to_num(szData) )  
- 	{  
- 		case 1: 
- 		{ 
-   
-   
-   
- 			give_item(id, "weapon_m4a1") 
- 			give_item(id, "weapon_deagle") 
- 			give_item(id, "weapon_smokegrenade") 
- 			give_item(id, "weapon_hegrenade") 
- 			give_item(id, "weapon_flashbang") 
- 			cs_set_user_bpammo(id,CSW_M4A1,90)  
- 			cs_set_user_bpammo(id,CSW_DEAGLE,35) 
- 			client_print(id, print_chat, "* M4A1 Csomagot választottál !"); 
-   
-   
-   
-   
-   
- 		} 
-   
- 		case 2:  
- 		{ 
- 			give_item(id, "weapon_ak47") 
- 			give_item(id, "weapon_deagle") 
- 			give_item(id, "weapon_smokegrenade") 
- 			give_item(id, "weapon_hegrenade") 
- 			give_item(id, "weapon_flashbang") 
- 			cs_set_user_bpammo(id,CSW_AK47,90) 
- 			cs_set_user_bpammo(id,CSW_DEAGLE,35) 
- 			client_print(id, print_chat, "* AK47 Csomagot választottál !"); 
- 		} 
-   
- 		case 3:  
- 		{ 
-   
-   
- 			if(awp < 4) 
- 			{	 
- 				give_item(id, "weapon_awp") 
- 				give_item(id, "weapon_deagle") 
- 				give_item(id, "weapon_smokegrenade") 
- 				give_item(id, "weapon_hegrenade") 
- 				give_item(id, "weapon_flashbang") 
- 				cs_set_user_bpammo(id,CSW_AWP,35) 
- 				cs_set_user_bpammo(id,CSW_DEAGLE,35) 
- 				client_print(id, print_chat, "* AWP Csomagot választottál !"); 
-   
- 				awp++ 
-   
- 			} 
-   
-   
- 			else 
- 			{ 
-   
-   
- 				ColorChat(id, GREEN, "[^x03Fegyvermenü^x04]^x03 Csak négy ember használhatja az awp -t!"); 
-   
-   
- 				Fegyvermenu(id); 
-   
-   
-   
-   
-   
-   
- 			} 
- 		} 
-   
- 		case 4:   
- 		{ 
- 			give_item(id, "weapon_scout") 
- 			give_item(id, "weapon_deagle") 
- 			give_item(id, "weapon_smokegrenade") 
- 			give_item(id, "weapon_hegrenade") 
- 			give_item(id, "weapon_flashbang") 
- 			cs_set_user_bpammo(id,CSW_SCOUT,90) 
- 			cs_set_user_bpammo(id,CSW_DEAGLE,35) 
- 			client_print(id, print_chat, "* Scout Csomagot választottál !"); 
- 		} 
-   
- 		case 5:  
- 		{ 
- 			give_item(id, "weapon_sg550") 
- 			give_item(id, "weapon_deagle") 
- 			give_item(id, "weapon_smokegrenade") 
- 			give_item(id, "weapon_hegrenade") 
- 			give_item(id, "weapon_flashbang") 
- 			cs_set_user_bpammo(id,CSW_SG550,90) 
- 			cs_set_user_bpammo(id,CSW_DEAGLE,35) 
- 			client_print(id, print_chat, "* Krieg Csomagot választottál !"); 
- 		} 
-   
- 		case 6:   
- 		{ 
- 			give_item(id, "weapon_famas") 
- 			give_item(id, "weapon_deagle") 
- 			cs_set_user_bpammo(id,CSW_FAMAS,90) 
- 			cs_set_user_bpammo(id,CSW_DEAGLE,35) 
- 			client_print(id, print_chat, "* Famas Csomagot választottál !"); 
- 		} 
-   
- 		case 7:  
- 		{ 
- 			give_item(id, "weapon_m3") 
- 			give_item(id, "weapon_deagle") 
- 			cs_set_user_bpammo(id,CSW_M3,32) 
- 			cs_set_user_bpammo(id,CSW_DEAGLE,35) 
- 			client_print(id, print_chat, "* Shoti Csomagot választottál !"); 
- 		} 
-   
- 		case 8:   
- 		{ 
- 			give_item(id, "weapon_aug") 
- 			give_item(id, "weapon_deagle") 
- 			cs_set_user_bpammo(id,CSW_AUG,90) 
- 			cs_set_user_bpammo(id,CSW_DEAGLE,35) 
- 			client_print(id, print_chat, "* Aug Csomagot választottál !"); 
- 		} 
-   
- 		case 9:   
- 		{ 
- 			give_item(id, "weapon_mp5navy") 
- 			give_item(id, "weapon_deagle") 
- 			cs_set_user_bpammo(id,CSW_MP5NAVY,120) 
- 			cs_set_user_bpammo(id,CSW_DEAGLE,35) 
- 			client_print(id, print_chat, "* SMG Csomagot választottál !"); 
- 		} 
-   
- 		case 10:  
- 		{ 
- 			give_item(id, "weapon_galil") 
- 			give_item(id, "weapon_deagle") 
- 			cs_set_user_bpammo(id,CSW_GALIL,90) 
- 			cs_set_user_bpammo(id,CSW_DEAGLE,35) 
- 			client_print(id, print_chat, "* Galil Csomagot választottál !");  
- 		} 
-   
- 		case 11:   
- 		{ 
- 			give_item(id, "weapon_m249") 
- 			give_item(id, "weapon_deagle") 
- 			cs_set_user_bpammo(id,CSW_M249,200) 
- 			cs_set_user_bpammo(id,CSW_DEAGLE,35) 
- 			client_print(id, print_chat, "* Machineguns Csomagot választottál !");   
- 		} 
- 	}  
-   
- 	return PLUGIN_HANDLED;  
- } 
- stock print_color(const id, const input[], any:...) 
-   
- { 
-   
-         new count = 1, players[32] 
-   
-         static msg[191] 
-   
-         vformat(msg, 190, input, 3) 
-   
-   
-   
-         replace_all(msg, 190, "!g", "^4") 
-   
-         replace_all(msg, 190, "!y", "^1") 
-   
-         replace_all(msg, 190, "!t", "^3") 
-   
-         replace_all(msg, 190, "á", "á") 
-   
-         replace_all(msg, 190, "é", "Ă©") 
-   
-         replace_all(msg, 190, "í", "Ă") 
-   
-         replace_all(msg, 190, "ó", "Ăł") 
-   
-         replace_all(msg, 190, "ö", "ö") 
-   
-         replace_all(msg, 190, "ő", "Ĺ‘") 
-   
-         replace_all(msg, 190, "ú", "Ăş") 
-   
-         replace_all(msg, 190, "ü", "ĂĽ") 
-   
-         replace_all(msg, 190, "ű", "ű") 
-   
-         replace_all(msg, 190, "Á", "Ă") 
-   
-         replace_all(msg, 190, "É", "É") 
-   
-         replace_all(msg, 190, "Í", "ĂŤ") 
-   
-         replace_all(msg, 190, "Ó", "Ă“") 
-   
-         replace_all(msg, 190, "Ö", "Ă–") 
-   
-         replace_all(msg, 190, "Ő", "Ĺ") 
-   
-         replace_all(msg, 190, "Ú", "Ăš") 
-   
-         replace_all(msg, 190, "Ü", "Ăś") 
-   
-         replace_all(msg, 190, "Ű", "Ű") 
-   
-   
-   
-         if (id) players[0] = id; else get_players(players, count, "ch") 
-   
-         { 
-   
-                 for (new i = 0; i < count; i++) 
-   
-                 { 
-   
-                         if (is_user_connected(players[i])) 
-   
-                         { 
-   
-                                 message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]) 
-   
-                                 write_byte(players[i]) 
-   
-                                 write_string(msg) 
-   
-                                 message_end() 
-   
-                         } 
-   
-                 } 
-   
-         } 
-   
-         return PLUGIN_HANDLED 
-   
- }