#include <amxmodx>
public plugin_init()
{
register_plugin("Server Menu", "0.1", "maFFyoZZyk")
register_clcmd("amx_menu", "function_menu", ADMIN_ALL,"")
register_clcmd("nightvision", "function_menu")
}
public function_menu(id)
{
new menu = menu_create("\yМеню\w Нашего\r Сервера\d", "menu_handler")
menu_additem(menu,"\r[\yОбнулить счет\r]","1")
menu_additem(menu,"\r[\yНоминировать карту\r]","2")
menu_additem(menu,"\r[\yСтатистика\r]","3")
menu_additem(menu,"\r[\yГолосование за GAG\r]","4")
menu_additem(menu,"\r[\yГолосование за БАН\r]","5")
menu_additem(menu,"\r[\yСтатистика за карту\r]","6")
menu_additem(menu,"\r[\yВаш RANK\r]","7")
menu_additem(menu,"\r[\yЗаткнуть игрока\r]","8")
menu_additem(menu,"\r[\yТОп лучших\r]","9")
menu_additem(menu,"\r[\yКупить Админку\r]","10")
menu_setprop(menu, MPROP_EXITNAME, "Выход")
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], access, callback
menu_item_getinfo(menu, item, access, data, 5, iName, 63, callback)
new key = str_to_num(data)
switch(key)
{
case 1: client_cmd(id, "say /rs")
case 2: client_cmd(id, "say /maps")
case 3: client_cmd(id, "say /rankstats")
case 4: client_cmd(id, "say /votegag")
case 5: client_cmd(id, "say /voteban")
case 6: client_cmd(id, "say /statsme")
case 7: client_cmd(id, "say /rank")
case 8: client_cmd(id, "say /mute")
case 9: client_cmd(id, "say /top10")
case 10: client_cmd(id, "say /adminka")
}
return PLUGIN_HANDLED
}