-  #include <amxmodx> 
- #include <amxmisc> 
- #include <colorchat> 
- #include <fun> 
- #include <cstrike> 
- #include <hamsandwich> 
-   
- #define PLUGIN "Weapon Menu" 
- #define VERSION "1.0" 
- #define AUTHOR "Silent" 
-   
- new gWPCT,gWPTE; 
- new g_showsec[33]; 
- new bool:already[33]; 
-   
- public plugin_init() { 
- register_plugin(PLUGIN, VERSION, AUTHOR) 
- register_clcmd("", "playerspawn"); 
- RegisterHam(Ham_Spawn, "player", "playerspawn", 1) 
- register_logevent("logevent_end", 2, "1=Round_End"); 
- register_logevent("logevent_end", 2, "1&Restart_Round"); 
- register_logevent("logevent_end", 2, "1=Game_Commencing"); 
- } 
-   
- public logevent_end() 
- { 
- gWPCT = 0; 
- gWPTE = 0; 
-   
- new players[32], pnum 
- get_players(players, pnum) 
- for(new i=0; i<pnum; i++) 
- { 
- already[i] = false; 
- } 
- } 
-   
- public playerspawn(id) 
- { 
- g_showsec[id] = 20; 
- already[id] = false; 
- fegyvermenu(id); 
- } 
-   
- public fegyvermenu(id) 
- { 
- if(!is_user_alive(id)) return PLUGIN_HANDLED; 
-   
- cs_set_user_money(id, 0); 
- new string[200]; 
-   
- if(g_showsec[id] <= 20) 
- { 
- if(g_showsec[id] != 0) 
- { 
- if(already[id]) return PLUGIN_HANDLED; 
- set_task(1.0, "fegyvermenu",id); 
- g_showsec[id]--; 
- } 
- else 
- { 
- show_menu(id, 0, "^n", 1); 
- return PLUGIN_HANDLED; 
- } 
- } 
-   
- if(!user_has_weapon(id, CSW_C4)) 
- { 
-   
- strip_user_weapons(id); 
- format(string, charsmax(string), "\yGameHut \rOnly Dust \y2^n\wFegyver csomagok\y[\r%d \wmp\y]\w:", g_showsec[id]); 
- new menu = menu_create(string, "handler") 
- menu_additem(menu, "\rM4A1 \yCsomag", "1", 0); 
- menu_additem(menu, "\rAK47 \yCsomag", "2", 0); 
- menu_additem(menu, "\rAWP \yCsomag \d[\rElso \y3 \rembernek!\d]", "3", 0); 
- menu_additem(menu, "\rMachineGun \yCsomag", "4", 0); 
- menu_additem(menu, "\rAUG \yCsomag", "5", 0); 
- menu_additem(menu, "\rFAMAS \yCsomag", "6", 0); 
- menu_additem(menu, "\rGalil \yCsomag", "7", 0); 
- menu_additem(menu, "\rSMG \yCsomag", "8", 0); 
- menu_additem(menu, "\rAutoshotgun \yCsomag", "9", 0); 
- menu_additem(menu, "\rShotgun \yCsomag", "10", 0); 
- menu_additem(menu, "\rScout \yCsomag", "11", 0); 
- menu_setprop(menu, MPROP_EXIT, MEXIT_ALL); 
- menu_display(id, menu); 
- } 
- else 
- { 
- formatex(string, charsmax(string), "\yGameHut \rOnly Dust \y2^n\wFegyver csomagok\y[\r%d \wmp\y]\w:", g_showsec[id]); 
- new menu = menu_create(string, "handler") 
- menu_additem(menu, "\rM4A1 \yCsomag", "1", 0); 
- menu_additem(menu, "\rAK47 \yCsomag", "2", 0); 
- menu_additem(menu, "\rAWP \yCsomag \d[\rElso \y2 \rembernek!\d]", "3", 0); 
- menu_additem(menu, "\rMachineGun \yCsomag", "4", 0); 
- menu_additem(menu, "\rAUG \yCsomag", "5", 0); 
- menu_additem(menu, "\rFAMAS \yCsomag", "6", 0); 
- menu_additem(menu, "\rGalil \yCsomag", "7", 0); 
- menu_additem(menu, "\rSMG \yCsomag", "8", 0); 
- menu_additem(menu, "\rAutoshotgun \yCsomag", "9", 0); 
- menu_additem(menu, "\rShotgun \yCsomag", "10", 0); 
- menu_additem(menu, "\rScout \yCsomag", "11", 0); 
- menu_setprop(menu, MPROP_EXIT, MEXIT_ALL); 
- menu_display(id, menu); 
- } 
-   
- return PLUGIN_HANDLED; 
- } 
-   
- public handler(id, menu, item) 
- { 
- if( item == MENU_EXIT ) 
- { 
- menu_destroy(menu); 
- return PLUGIN_HANDLED; 
- } 
- already[id] = true; 
- new data[6], szName[64]; 
- new access, callback; 
- menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback); 
- new key = str_to_num(data); 
- switch(key) 
- { 
-   
- case 1: 
- { 
-   
- give_player_grenades(id); 
- give_item(id, "weapon_knife"); 
- give_item(id, "weapon_deagle"); 
- give_item(id, "ammo_50ae"); 
- give_item(id, "ammo_50ae"); 
- give_item(id, "ammo_50ae"); 
- give_item(id, "weapon_m4a1"); 
- give_item(id, "ammo_556nato"); 
- give_item(id, "ammo_556nato"); 
- give_item(id, "ammo_556nato"); 
- ColorChat(id, BLUE, "^x01[^x03GameHut ^x04Only Dust^x03 2^x01]^x04 - ^x03Kaptal egy^x04 M4A1^x03 csomagot!"); 
- } 
- case 2: 
- { 
-   
- give_player_grenades(id); 
- give_item(id, "weapon_knife"); 
- give_item(id, "weapon_deagle"); 
- give_item(id, "ammo_50ae"); 
- give_item(id, "ammo_50ae"); 
- give_item(id, "ammo_50ae"); 
- give_item(id, "weapon_ak47"); 
- give_item(id, "ammo_762nato"); 
- give_item(id, "ammo_762nato"); 
- give_item(id, "ammo_762nato"); 
- ColorChat(id, BLUE, "^x01[^x03GameHut ^x04Only Dust^x03 2^x01]^x04 - ^x03Kaptal egy^x04 AK47^x03 csomagot!"); 
- } 
- case 3: 
- { 
- new CsTeams:userTeam = cs_get_user_team(id); 
- if(userTeam == CS_TEAM_CT) 
- { 
- if(gWPCT < 2) 
- { 
-   
- give_player_grenades(id); 
- give_item(id, "weapon_knife"); 
- give_item(id, "weapon_awp"); 
- give_item(id, "weapon_deagle"); 
- give_item(id, "ammo_50ae"); 
- give_item(id, "ammo_50ae"); 
- give_item(id, "ammo_50ae"); 
- give_item(id, "ammo_338magnum"); 
- give_item(id, "ammo_338magnum"); 
- give_item(id, "ammo_338magnum"); 
- ColorChat(id, BLUE, "^x01[^x03GameHut ^x04Only Dust^x03 2^x01]^x04 - ^x03Kaptal egy^x04 AWP^x03 csomagot!"); 
- gWPCT++ 
- } 
- else 
- { 
- client_print(id, print_center, "Csak 2 ember AWP-zhet csapatonkent!"); 
- fegyvermenu(id); 
- } 
- } 
- if(userTeam == CS_TEAM_T) 
- { 
- if(gWPTE < 2) 
- { 
-   
- give_player_grenades(id); 
- give_item(id, "weapon_knife"); 
- give_item(id, "weapon_awp"); 
- give_item(id, "weapon_deagle"); 
- give_item(id, "ammo_50ae"); 
- give_item(id, "ammo_50ae"); 
- give_item(id, "ammo_50ae"); 
- give_item(id, "ammo_338magnum"); 
- give_item(id, "ammo_338magnum"); 
- give_item(id, "ammo_338magnum"); 
- ColorChat(id, BLUE, "^x01[^x03GameHut ^x04Only Dust^x03 2^x01]^x04 - ^x03Kaptal egy^x04 AWP^x03 csomagot!"); 
- gWPTE++ 
- } 
- else 
- { 
- client_print(id, print_center, "Csak 2 ember AWP-zhet csapatonkent!"); 
- fegyvermenu(id); 
- } 
- } 
-   
- } 
- case 4: 
- { 
-   
- give_player_grenades(id); 
- give_item(id, "weapon_knife"); 
- give_item(id, "weapon_deagle"); 
- give_item(id, "ammo_50ae"); 
- give_item(id, "ammo_50ae"); 
- give_item(id, "ammo_50ae"); 
- give_item(id, "weapon_m249"); 
- give_item(id, "ammo_556natobox"); 
- give_item(id, "ammo_556natobox"); 
- give_item(id, "ammo_556natobox"); 
- ColorChat(id, BLUE, "^x01[^x03GameHut ^x04Only Dust^x03 2^x01]^x04 - ^x03Kaptal egy^x04 MachineGun^x03 csomagot!"); 
- } 
- case 5: 
- { 
-   
- give_player_grenades(id); 
- give_item(id, "weapon_knife"); 
- give_item(id, "weapon_deagle"); 
- give_item(id, "ammo_50ae"); 
- give_item(id, "ammo_50ae"); 
- give_item(id, "ammo_50ae") 
- give_item(id, "weapon_aug"); 
- give_item(id, "ammo_556nato"); 
- give_item(id, "ammo_556nato"); 
- give_item(id, "ammo_556nato"); 
- ColorChat(id, BLUE, "^x01[^x03GameHut ^x04Only Dust^x03 2^x01]^x04 - ^x03Kaptal egy^x04 AUG^x03 csomagot!"); 
- } 
- case 6: 
- { 
-   
- give_player_grenades(id); 
- give_item(id, "weapon_knife"); 
- give_item(id, "weapon_deagle"); 
- give_item(id, "ammo_50ae"); 
- give_item(id, "ammo_50ae"); 
- give_item(id, "ammo_50ae") 
- give_item(id, "weapon_famas"); 
- give_item(id, "ammo_556nato"); 
- give_item(id, "ammo_556nato"); 
- give_item(id, "ammo_556nato"); 
- ColorChat(id, BLUE, "^x01[^x03GameHut ^x04Only Dust^x03 2^x01]^x04 - ^x03Kaptal egy^x04 FAMAS^x03 csomagot!"); 
- } 
- case 7: 
- { 
-   
- give_player_grenades(id); 
- give_item(id, "weapon_knife"); 
- give_item(id, "weapon_deagle"); 
- give_item(id, "ammo_50ae"); 
- give_item(id, "ammo_50ae"); 
- give_item(id, "ammo_50ae") 
- give_item(id, "weapon_galil"); 
- give_item(id, "ammo_556nato"); 
- give_item(id, "ammo_556nato"); 
- give_item(id, "ammo_556nato"); 
- ColorChat(id, BLUE, "^x01[^x03GameHut ^x04Only Dust^x03 2^x01]^x04 - ^x03Kaptal egy^x04 Galil^x03 csomagot!"); 
- } 
- case 8: 
- { 
-   
- give_player_grenades(id); 
- give_item(id, "weapon_knife"); 
- give_item(id, "weapon_deagle"); 
- give_item(id, "ammo_50ae"); 
- give_item(id, "ammo_50ae"); 
- give_item(id, "ammo_50ae") 
- give_item(id, "weapon_mp5navy"); 
- give_item(id, "ammo_9mm"); 
- give_item(id, "ammo_9mm"); 
- give_item(id, "ammo_9mm"); 
- ColorChat(id, BLUE, "^x01[^x03GameHut ^x04Only Dust^x03 2^x01]^x04 - ^x03Kaptal egy^x04 SMG^x03 csomagot!"); 
- } 
- case 9: 
- { 
-   
- give_player_grenades(id); 
- give_item(id, "weapon_knife"); 
- give_item(id, "weapon_deagle"); 
- give_item(id, "ammo_50ae"); 
- give_item(id, "ammo_50ae"); 
- give_item(id, "ammo_50ae") 
- give_item(id, "weapon_xm1014"); 
- give_item(id, "ammo_buckshot"); 
- give_item(id, "ammo_buckshot"); 
- give_item(id, "ammo_buckshot"); 
- ColorChat(id, BLUE, "^x01[^x03GameHut ^x04Only Dust^x03 2^x01]^x04 - ^x03Kaptal egy^x04 AutoShotgun^x03 csomagot!"); 
- } 
- case 10: 
- { 
-   
- give_player_grenades(id); 
- give_item(id, "weapon_knife"); 
- give_item(id, "weapon_deagle"); 
- give_item(id, "ammo_50ae"); 
- give_item(id, "ammo_50ae"); 
- give_item(id, "ammo_50ae") 
- give_item(id, "weapon_m3"); 
- give_item(id, "ammo_buckshot"); 
- give_item(id, "ammo_buckshot"); 
- give_item(id, "ammo_buckshot"); 
- ColorChat(id, BLUE, "^x01[^x03GameHut ^x04Only Dust^x03 2^x01]^x04 - ^x03Kaptal egy^x04 Shotgun^x03 csomagot!"); 
- } 
- case 11: 
- { 
-   
- give_player_grenades(id); 
- give_item(id, "weapon_knife"); 
- give_item(id, "weapon_deagle"); 
- give_item(id, "ammo_50ae"); 
- give_item(id, "ammo_50ae"); 
- give_item(id, "ammo_50ae") 
- give_item(id, "weapon_scout"); 
- give_item(id, "ammo_762nato"); 
- give_item(id, "ammo_762nato"); 
- give_item(id, "ammo_762nato"); 
- ColorChat(id, BLUE, "^x01[^x03GameHut ^x04Only Dust^x03 2^x01]^x04 - ^x03Kaptal egy^x04 Scout^x03 csomagot!"); 
- } 
- } 
- return PLUGIN_HANDLED; 
- } 
-   
- stock give_player_grenades(index) 
- { 
- give_item(index, "weapon_hegrenade"); 
- give_item(index, "weapon_flashbang"); 
- give_item(index, "weapon_smokegrenade"); 
- give_item(index, "item_thighpack"); 
- give_item(index, "item_assaultsuit"); 
- }