#include <amxmodx>
#include <amxmisc>
#include <colorchat>
#include <fun>
#include <cstrike>
#include <hamsandwich>
#define PLUGIN ""
#define VERSION "1.0"
#define AUTHOR ""
new gWPCT;
new gWPTE;
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Spawn, "player", "fegyvermenu", 1)
register_clcmd("say /guns", "parancsok");
register_clcmd("say guns", "parancsok");
register_logevent("logevent_end", 2, "1=Round_End");
}
public logevent_end()
{
gWPCT = 0;
gWPTE = 0;
}
public parancsok(id)
{
{
set_user_health(id, get_user_health(id)-99)
fegyvermenu(id);
ColorChat(id, GREEN, "Levettem^4 99hp-t /guns vagy guns^4 parancs miatt!")
}
}
public fegyvermenu(id)
{
cs_set_user_money(id, 0); // Penz nullazasa
strip_user_weapons(id) //Fegyver elvetele
if(!user_has_weapon(id, CSW_C4))
new menu = menu_create("\rPlayNow OnlyDust2# \d- \rVálassz fegyvercsomagot\d!", "handler");
menu_additem(menu, "\yM4A1 Csomag", "1", 0);
menu_additem(menu, "\yAK47 Csomag", "2", 0);
menu_additem(menu, "\yAWP Csomag \d[\relso \y2 \rembernek\d]", "3", 0);
menu_additem(menu, "\yMachineGun Csomag", "4", 0);
menu_additem(menu, "\yAUG Csomag", "5", 0);
menu_additem(menu, "\yFAMAS Csomag", "6", 0);
menu_additem(menu, "\yGalil Csomag", "7", 0);
menu_additem(menu, "\ySMG Csomag", "8", 0);
menu_additem(menu, "\yAutoshotgun Csomag", "9", 0);
menu_additem(menu, "\yShotgun Csomag", "10", 0);
menu_additem(menu, "\yScout Csomag", "11", 0);
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu);
}
else
{
new menu = menu_create("\rRaptorz Gaming \d- \rValasz fegyver csomagot\d!", "handler");
menu_additem(menu, "\yM4A1 Csomag", "1", 0);
menu_additem(menu, "\yAK47 Csomag", "2", 0);
menu_additem(menu, "\yAWP Csomag \d[\relso \y2 \rembernek\d]", "3", 0);
menu_additem(menu, "\yMachineGun Csomag", "4", 0);
menu_additem(menu, "\yAUG Csomag", "5", 0);
menu_additem(menu, "\yFAMAS Csomag", "6", 0);
menu_additem(menu, "\yGalil Csomag", "7", 0);
menu_additem(menu, "\ySMG Csomag", "8", 0);
menu_additem(menu, "\yAutoshotgun Csomag", "9", 0);
menu_additem(menu, "\yShotgun Csomag", "10", 0);
menu_additem(menu, "\yScout Csomag", "11", 0);
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu);
}
}
public 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 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, GREEN, "[PlayNow OnlyDust2] ^1Te az^4 M4A1 ^1csomagot valasztotad!");
}
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, GREEN, "[PlayNow OnlyDust2] ^1Te az^4 AK47 ^1csomagot valasztotad!");
}
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, GREEN, "[PlayNow OnlyDust2] ^1Te az^4 AWP ^1csomagot valasztotad!");
gWPCT++
}
else
{
client_print(id, print_center, "Csak 2 ember wpzhet 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, GREEN, "[PlayNow OnlyDust2] ^1Te az^4 AWP ^1csomagot valasztotad!");
gWPTE++
}
else
{
client_print(id, print_center, "Csak 2 ember wpzhet 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, GREEN, "[PlayNow OnlyDust2] ^1Te a^4 MachineGun ^1csomagot valasztotad!");
}
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, GREEN, "[PlayNow OnlyDust2] ^1Te az^4 AUG ^1csomagot valasztotad!");
}
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, GREEN, "[PlayNow OnlyDust2] ^1Te a^4 Famas ^1csomagot valasztotad!");
}
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, GREEN, "[PlayNow OnlyDust2] ^1Te a^4 Galil ^1csomagot valasztotad!");
}
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, GREEN, "[PlayNow OnlyDust2] ^1Te az^4 Smg ^1csomagot valasztotad!");
}
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, GREEN, "[PlayNow OnlyDust2] ^1Te az^4 AutoShotgun ^1csomaot valasztotad!");
}
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, GREEN, "[PlayNow OnlyDust2] ^1Te az^4 M3 ^1csomagot valasztotad!");
}
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, GREEN, "[PlayNow OnlyDust2] ^1Te a^4 Scout ^1csomagot valasztotad!");
}
}
return PLUGIN_HANDLED;
}
stock give_player_grenades(index)
{
give_item(index, "weapon_hegrenade");
give_item(index, "weapon_flashbang");
give_item(index, "weapon_flashbang");
give_item(index, "item_thighpack");
give_item(index, "item_assaultsuit");
}