SMaster | Дата: Пятница, 11.01.2013, 11:12 | Сообщение # 2 |
- Сообщения: 2189
- Награды: 46
- Замечания:
|
Скобок натыкано много!
Держи Код #include <amxmodx>
#define PLUGIN "Menu_F3" #define VERSION "1.0" #define AUTHOR "AdenkinG"
public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("client_menu", "xmenu") } public client_authorized(id) { client_cmd(id, "bind F3 client_menu") } public xmenu(id){ new aden_menu = menu_create("Меню для пользователей^n\wBy AdenkinG", "menu_handler") menu_additem(aden_menu, "\rИнфа по War3FT mod'e", "1") menu_additem(aden_menu, "\rМагазины", "2") menu_additem(aden_menu, "\rПокупка привилегий", "3") menu_additem(aden_menu, "\rСтатистика", "4") menu_additem(aden_menu, "\rСмена карты", "5") menu_setprop(aden_menu, MPROP_EXITNAME, "\yВыход\y") menu_display(id, aden_menu, 0) } public infa01(id){ new infa = menu_create("Инфа по War3FT", "menu1_handler") menu_additem(infa, "Инфо о расах", "1") menu_additem(infa, "Команды и бинды", "2") menu_setprop(infa, MPROP_EXITNAME, "Выход") menu_display(id, infa, 0) } public infa02(id){ new magaz = menu_create("Магазины", "menu2_handler") menu_additem(magaz, "Магазин 1", "1") menu_additem(magaz, "Магазин 2", "2") menu_additem(magaz, "Магазин 3", "3") menu_additem(magaz, "Магазин 4", "4") menu_setprop(magaz, MPROP_EXITNAME, "Выход") menu_display(id, magaz, 0) } public infa03(id){ new vipss = menu_create("Покупка привилегий", "menu3_handler") menu_additem(vipss, "Покупка Админки", "1") menu_additem(vipss, "Покупка ХР/Талисманов", "2") menu_setprop(vipss, MPROP_EXITNAME, "Выход") menu_display(id, vipss, 0) } public infa04(id){ new top_stats = menu_create("Статистика", "menu4_handler") menu_additem(top_stats, "Топ 15", "1") menu_additem(top_stats, "Своя статистика", "2") menu_setprop(top_stats, MPROP_EXITNAME, "Выход") menu_display(id, top_stats, 0) } public infa05(id){ new infa = menu_create("Смена карты", "menu5_handler") menu_additem(infa, "Информация о смене карты", "1") menu_setprop(infa, MPROP_EXITNAME, "Выход") menu_display(id, infa, 0) } public menu_handler(id, menu, item) { if(item == MENU_EXIT) { menu_destroy(menu) return PLUGIN_HANDLED } new data[6], iName[64], access, callback menu_item_getinfo(menu, item, access, data, 5, iName, 63, callback) new key = str_to_num(data) switch(key) { case 1: { infa01(id) } case 2: { infa02(id) } case 3: { infa03(id) } case 4: { infa04(id) } case 5: { infa05(id) } } return PLUGIN_HANDLED } public menu1_handler(id, menu, item) { if(item == MENU_EXIT) { menu_destroy(menu) return PLUGIN_HANDLED } new data[6], iName[64], access, callback menu_item_getinfo(menu, item, access, data, 5, iName, 63, callback) new key = str_to_num(data) switch(key) { case 1: { console_cmd(id, "say playerskills") } case 2: { console_cmd(id, "say war3help") } }
return PLUGIN_HANDLED } public menu2_handler(id, menu, item) { if(item == MENU_EXIT) { menu_destroy(menu) return PLUGIN_HANDLED } new data[6], iName[64], access, callback menu_item_getinfo(menu, item, access, data, 5, iName, 63, callback) new key = str_to_num(data) switch(key) { case 1: { console_cmd(id, "say shopmenu") }
case 2: { console_cmd(id, "say shopmenu2") } case 3: { console_cmd(id, "say shopmenu3") } case 4: { console_cmd(id, "say shopmenu4") } }
return PLUGIN_HANDLED } public menu3_handler(id, menu, item) { if(item == MENU_EXIT) { menu_destroy(menu) return PLUGIN_HANDLED } new data[6], iName[64], access, callback menu_item_getinfo(menu, item, access, data, 5, iName, 63, callback) new key = str_to_num(data) switch(key) { case 1: { console_cmd(id, "say /adminka") }
case 2: { console_cmd(id, "say /xp") } }
return PLUGIN_HANDLED } public menu4_handler(id, menu, item) { if(item == MENU_EXIT) { menu_destroy(menu) return PLUGIN_HANDLED } new data[6], iName[64], access, callback menu_item_getinfo(menu, item, access, data, 5, iName, 63, callback) new key = str_to_num(data) switch(key) { case 1: { console_cmd(id, "say /top15") }
case 2: { console_cmd(id, "say /rank") } } return PLUGIN_HANDLED } public menu5_handler(id, menu, item) { if(item == MENU_EXIT) { menu_destroy(menu) return PLUGIN_HANDLED } new data[6], iName[64], access, callback menu_item_getinfo(menu, item, access, data, 5, iName, 63, callback) new key = str_to_num(data) switch(key) { case 1: { console_cmd(id, "say /umm") } }
return PLUGIN_HANDLED }
Наша группа вконтакте http://vk.com/nano_world_cs
Контакты: ICQ 607786179 Skype xonahead
|
|
| |