Minden sort lekell zárni!
Kód:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta_util>
#include <colorchat>
#define NEV "Fegyver Kero Menu"
#define VERZIO "1.0"
#define KESZITO "Black"
new menu
public plugin_init()
{
register_plugin(NEV, VERZIO, KESZITO)
register_clcmd("say /menu", "menu2")
register_clcmd("say_team /menu", "menu2")
}
public menu2(id)
{
new menu = menu_create("Valassz a Menubol", "menuhandler")
menu_additem(menu, "Ingyen M4a1", "0", 0)
menu_additem(menu, "Ingyen Ak47", "1", 0)
menu_additem(menu, "Ingyen AWP", "2", 0)
menu_additem(menu, "Ingyen Robbano,Villano,fust granat", "3", 0)
}
public menuhandler(id, menu, item)
{
new nev[33]
get_user_name ( id , nev , 32 )
if(item == MENU_EXIT)
{
menu_destroy(menu)
}
menu_display(id, menu)
switch(item)
{
case 0:
{
fm_give_item(id, "weapon_m4a1")
fm_give_item(id, "ammo_556nato")
fm_give_item(id, "ammo_556nato")
fm_give_item(id, "ammo_556nato")
ColorChat(0, RED, "[SZERVER] ^1%s Kapott ingyen egy m1a4-est", nev)
}
case 1:
{
fm_give_item(id, "weapon_ak47")
fm_give_item(id, "ammo_762nato")
fm_give_item(id, "ammo_762nato")
fm_give_item(id, "ammo_762nato")
ColorChat(0, BLUE, "[SZERVER] ^1%s Kapott ingyen egy ak 47-et", nev)
}
case 2:
{
fm_give_item(id, "weapon_awp")
fm_give_item(id, "ammo_338magnum")
fm_give_item(id, "ammo_338magnum")
fm_give_item(id, "ammo_338magnum")
ColorChat(0, GREEN, "[SZERVER] ^1%s Kapott ingyen egy awp-t", nev)
}
case 3:
{
fm_give_item(id, "weapon_hegranade")
fm_give_item(id, "weapon_smokegranade")
fm_give_item(id, "weapon_flashbang")
ColorChat(0, RED, "[SZERVER] ^1%s Kapott ingyen he,flas,smoke granatot", nev)
}
}
return PLUGIN_HANDLED
}