#include
new menu
new cvar_showhudmsg
public plugin_init()
{
cvar_showhudmsg = register_cvar("show_hudmsg", "1"); //1 - вкл 0 - выкл
register_plugin("Menu","1.0","F1rsT");
menu = menu_create("\rМеню Сервера:","func_menu");
menu_additem( menu, "\yОбнулить \rс\yч\rе\yт!")
menu_additem( menu, "\yКупить Jetpack!")
menu_additem( menu, "\yАдмин \rМеню")
menu_additem( menu, "\yVIP \rМеню")
menu_additem( menu, "\yЗабанить \rИгрока")
menu_additem( menu, "\yКупить \rа\yд\rм\yи\rн\yк\rу")
menu_setprop(menu, MPROP_NEXTNAME, "Дальше")
menu_setprop(menu, MPROP_BACKNAME, "Назад")
menu_setprop(menu, MPROP_EXITNAME, "Выход")
menu_setprop(menu, MPROP_EXIT,MEXIT_ALL)
register_clcmd("menu","go_menu");
}
public client_putinserver(id)
{
if(get_pcvar_num(cvar_showhudmsg))
set_task(1.0, "task_hudmsg", id, _, _, "b")
}
public task_hudmsg(id)
{
set_hudmessage(0, 255, 0, 0.75, 0.0, 0, 6.0, 12.0)
show_hudmessage(id, "Меню Сервера, нажми на F3")
}
public client_authorized(id)
{
client_cmd(id, "bind^"F3^"menu")
}
public func_menu(id, menu, key)
{
key++
if(key==1) client_cmd(id, "say /rs")
if(key==2) client_cmd(id, "say /jet")
if(key==3) client_cmd(id, "adminmenu")
if(key==4) client_cmd(id, "vipmenu")
if(key==5) client_cmd(id, "say /voteban")
if(key==6) client_cmd(id, "say /adminka")
}
public go_menu(id)
{
menu_display(id,menu)
return PLUGIN_HANDLED
}