#include <amxmodx>
#include <hamsandwich>
public plugin_init()
{
register_plugin("Millennium Menu", "0.3f", "Reeps")
register_clcmd("nightvision", "function_menu")
register_clcmd("menu", "function_menu")
register_clcmd("say /menu", "function_menu")
register_clcmd("say_team /menu", "function_menu")
RegisterHam(Ham_Spawn, "player", "player_spawn", 1)
RegisterHam(Ham_Killed, "player", "HamPlayerKilled", 1)
}
public player_spawn(id)
show_menu(id, 0, "^n", 1)
public HamPlayerKilled(id)
show_menu(id, 0, "^n", 1)
public function_menu(id)
{
new menu = menu_create("\yМеню сервера ***URAAALSK***", "menu_handler")
menu_additem(menu, "\wОбнулить счет \r/rs", "1")
menu_additem(menu, "\wНоминация карт \r/maps", "2")
menu_additem(menu, "\wЗаткнуть игрока \r/mute", "3")
menu_additem(menu, "\wГолосование за \yБАН \r/voteban", "4")
menu_additem(menu, "\wБонусы \yAES \r/anew", "5")
menu_additem(menu, "\yVIP-меню \r/vipmenu", "6")
menu_additem(menu, "\wСервера проекта \r/server", "7")
menu_additem(menu, "\wПокупка привилегий", "8")
menu_additem(menu, "\wСписок чат-команд сервера", "9")
menu_additem(menu, "\wСписок администраторов", "10")
menu_additem(menu, "\wАкции сервера", "11")
menu_additem(menu, "\wЧасто задаваемые вопросы", "12")
menu_additem(menu, "\wИнформация о \rVIP \yпривилегиях", "13")
menu_additem(menu, "\wПравила для игроков", "14")
menu_additem(menu, "\wПравила для администраторов", "15")
menu_additem(menu, "\wАдмин меню \r[\yAMXMODXMENU\r]", "16")
menu_setprop(menu, MPROP_NEXTNAME, "Далее")
menu_setprop(menu, MPROP_BACKNAME, "Назад")
menu_setprop(menu, MPROP_EXITNAME, "Выход")
menu_display(id, menu, 0)
return PLUGIN_HANDLED
}
public menu_handler(id, menu, item)
{
if(item == MENU_EXIT)
{
show_menu(id, 0, "^n", 1)
return PLUGIN_HANDLED
}
new s_Data[6], s_Name[64], i_Access, i_Callback
menu_item_getinfo(menu, item, i_Access, s_Data, charsmax(s_Data), s_Name, charsmax(s_Name), i_Callback)
new i_Key = str_to_num(s_Data)
switch(i_Key)
{
case 1: client_cmd(id, "say /rs")
case 2: client_cmd(id, "say /maps")
case 3: client_cmd(id, "say /mute")
case 4: client_cmd(id, "say /voteban")
case 5: client_cmd(id, "say /anew")
case 6: client_cmd(id, "say /vipmenu")
case 7: client_cmd(id, "say /server")
case 8: client_cmd(id, "say /buy")
case 9: client_cmd(id, "say /say")
case 10: client_cmd(id, "say /admin")
case 11: client_cmd(id, "say /stock")
case 12: client_cmd(id, "say /help")
case 13: client_cmd(id, "say /vip")
case 14: client_cmd(id, "say /pr")
case 15: client_cmd(id, "say /ar")
case 16: client_cmd(id, "amxmodmenu")
}
return PLUGIN_HANDLED
}