#include <amxmodx>
#include <amxmisc>
public plugin_init()
{
register_clcmd("say /vipgun", "vipgun")
}
public vipgun(id)
{
new menu = menu_create("\y [ADMIN/VIP GUN]", "menu_vipgun")
menu_additem(menu, "\w 烈焰戰魂SPAS-12EX", "1", ADMIN_LEVEL_A)
menu_additem(menu, "\r 玩命骷髏", "2", ADMIN_BAN)
menu_additem(menu, "\w 闇獄閻羅SKULL-3", "3", ADMIN_BAN)
menu_additem(menu, "\r 獵魔者", "4", ADMIN_BAN)
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
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], iName[64]
new access, callback
menu_item_getinfo(menu, item, access, data,5, iName, 63, callback)
new key = str_to_num(data)
switch(key)
{
case 1:
{
client_print(id, print_chat, "你買了烈焰戰魂SPAS-12EX")
client_print(id, print_console, "buy_spas12ex")
menu_destroy(menu)
return PLUGIN_HANDLED
}
case 2:
{
client_print(id, print_chat, "你買了玩命骷髏")
client_print(id, print_console, "buy_skull1")
menu_destroy(menu)
return PLUGIN_HANDLED
}
case 3:
{
client_print(id, print_chat, "你買了闇獄閻羅SKULL-3")
client_print(id, print_console, "buy_skull3")
menu_destroy(menu)
return PLUGIN_HANDLED
}
case 4:
{
client_print(id, print_chat, "你買了獵魔者")
client_print(id, print_console, "buy_b1")
menu_destroy(menu)
return PLUGIN_HANDLED
}
}
menu_destroy(menu)
return PLUGIN_HANDLED
}
error010:invalid function or declaration WHY?