lilaihung8
|
分享:
▼
/* Plugin generated by AMXX-Studio */
#include <amxmodx> #include <amxmisc> #include <fun> #include <cstrike>
#define PLUGIN "选单" #define VERSION "1.0" #define AUTHOR "keith yu" #define m_c menu_create #define m_a menu_additem
public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("say /gunmenu", "gunmenu") }
public gunmenu(id) { new menu = m_c("\r测试选单 By Xliao~New_Keith", "menu_creater") m_a(menu, "\w测试一", "1", 0) m_a(menu, "\y测试二", "2", 0) m_a(menu, "\w测试三", "3", 0) menu_setprop(menu, MPROP_EXIT, MEXIT_ALL) menu_display(id, menu, 0) }
public menu_creater(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: { menu_destroy(menu) return PLUGIN_HANDLED }
case 2: { client_print(id, print_chat, "我学紧写插件") menu_destroy(menu) return PLUGIN_HANDLED } case 3: { if(is_user_alive(id)) { give_item(id, "weapon_awp") menu_destroy(menu) return PLUGIN_HANDLED } else { client_print(id, print_chat, "你死左不能拎awp") menu_destroy(menu) return PLUGIN_HANDLED } } //到底错了甚么 有没有大大指教一下 /* Plugin generated by AMXX-Studio */
|