1
include amxmodxДобавлено (2013-10-06, 20:28)
---------------------------------------------
#include amxmodx
new chat[33]
new speed[33]
new music[33]
#define PLUGIN "menushka"
#define VERSION "1.0"
#define AUTHOR "Dev1l^^"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("mcsdm", "server_menu" )
register_clcmd("mcsdm2", "server_menu2" )
}
public client_authorized(id)
{
client_cmd(id, "bind ^"F3^" ^"mcsdm^"")
}
public server_menu(id)
{
new i_Menu = menu_create("\yМеню сервера IntelGaming \y1\r/\y2", "MENU" )
menu_additem(i_Menu, "\wКупить Джетпак", "1", 0)
menu_additem(i_Menu, "\wОбнулить счет", "2", 0)
menu_additem(i_Menu, "\wМеню прокачки", "3", 0)
if(!speed[id])
{
menu_additem(i_Menu,"Спидометр\r: \y[\rВыключен\y]^n", "4", 0)
}
else
{
menu_additem(i_Menu,"Спидометр\r: \y[\dВключен\y]^n", "4", 0)
}
menu_additem(i_Menu, "\wВипы Онлайн", "5", 0)
menu_additem(i_Menu, "\wАдмины Онлайн", "6", 0)
if(!music[id])
{
menu_additem(i_Menu,"Музыка\r: \y[\rВключена\y]^n", "4", 0)
}
else
{
menu_additem(i_Menu,"Музыка\r: \y[\dВыключена\y]^n", "4", 0)
if(!chat[id])
{
menu_additem(i_Menu,"Язык Чата\r: \r[ \yРусский \r]^n", "8", 0)
}
else
{
menu_additem(i_Menu,"Язык Чата\r: \r[ \yАнгийский \r]^n", "8", 0)
}
menu_additem(i_Menu, "Далее", "9", 0)
menu_additem(i_Menu,"Выход", "0", 0)
menu_setprop(i_Menu, MPROP_PERPAGE, 0)
menu_display(id, i_Menu, 0)
return PLUGIN_HANDLED
}
public MENU(id, menu, item);
{
if (item == MENU_EXIT)
{
menu_destroy(menu)
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 /buyjetpack")
}
case 2:
{
client_cmd(id, "say /rs")
}
case 3:
{
client_cmd(id, "say /rpg")
}
case 4:
{
if(speed[id])
{
client_cmd(id, "say /speed")
speed[id] = 0
server_menu(id)
}
else
{
client_cmd(id, "say /speed")
speed[id] = 1
server_menu(id)
}
}
case 5:
{
client_cmd(id, "say /vips")
}
case 6:
{
client_cmd(id, "say /admin")
}
case 7:
{
if(music[id])
{
client_cmd(id, "say /ermon")
music[id] = 0
server_menu(id)
}
else
{
client_cmd(id, "say /ermoff")
music[id] = 1
server_menu(id)
}
case 8:
{
if(chat[id])
{
client_cmd(id, "say /rus")
chat[id] = 0
server_menu(id)
}
else
{
client_cmd(id, "say /eng")
chat[id] = 1
server_menu(id)
}
}
case 9:
{
client_cmd(id, "mcsdm2")
}
}
menu_destroy(menu)
return PLUGIN_HANDLED
}
public server_menu2(id)
{
new i_Menu = menu_create("\yМеню сервера IntelGaming \y2\r/\y2", "MENU2" )
menu_additem(i_Menu, "\wПравила Сервера", "1", 0)
menu_additem(i_Menu, "\wЛучшие Игроки", "2", 0)
menu_additem(i_Menu, "\wСвоя Статистика", "3", 0)
menu_additem(i_Menu, "\wНоминировать Карту", "4", 0)
menu_addblank( i_Menu, 0)
menu_additem(i_Menu, "\wРанк на Сервере", "5", 0)
menu_additem(i_Menu, "\wIP Нашего Сервера", "6", 0)
menu_additem(i_Menu, "\wСвязь с Гл. Админом", "7", 0)
menu_additem(i_Menu, "\wПерезайти на Сервер", "8", 0)
menu_addblank( i_Menu, 0)
menu_additem(i_Menu,"Назад", "9", 0)
menu_additem(i_Menu,"Выход", "0", 0)
menu_setprop(i_Menu, MPROP_PERPAGE, 0)
menu_display(id, i_Menu, 0)
return PLUGIN_HANDLED
}
public MENU2(id, menu, item)
{
if (item == MENU_EXIT)
{
menu_destroy(menu)
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 /ryles")
}
case 2:
{
client_cmd(id, "say /top15")
}
case 3:
{
client_cmd(id, "say /statsme")
}
case 4:
{
client_cmd(id, "maps_menu")
}
case 5:
{
client_cmd(id, "say /rank")
}
case 6:
{
Color_Print(id, "!y[!gВнимание!y] !gIP !yНашего !gСервера !y- !g178.124.130.34:27166")
}
case 7:
{
Color_Print(id, "!y[!gВнимание!y] !gSkype !yГлавного !gАдмина Сервера !y- !gboombox.name")
}
case 8:
{
client_cmd(id, "reconnect")
}
case 9:
{
client_cmd(id, "mcsdm")
}
}
menu_destroy(menu)
return PLUGIN_HANDLED
}
stock Color_Print(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)
replace_all(msg, 190, "!g", "^4") // Green Color
replace_all(msg, 190, "!y", "^1") // Default Color
replace_all(msg, 190, "!team", "^3") // Team Color
if (id) players[0] = id; else get_players(players, count, "ch")
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}