- Article
- 2018-04-30
Приступим!
1. Создаём в любом удобном для вас месте текстовый документ и называем
как хотим (но с приставкой .sma) я назову - menu.sma
Результат:
при помощи notepad++)
3. В самом начале пишем: #pragma compress 1 (По желанию,это защита от декомпиляции amxx)
4. Делаем 2 отступа (2 раза ENTER) Подключаем #include - #include <amxmodx> (Вы можете подключать и другие include'ы,лично мне нужен лишь amxmodx)
5. Добавляем #define -
#define PLUGIN "Menu" ;Название плагина
#define VERSION "0.1" ;Версия плагина
#define AUTHOR "tb-team.com" ;Автор плагина
Результат:
6. После строчек с #define на след. строчке пишем - new menu
7. Делаем 2 отступа (Нажимаем на new menu и жмём 2 раза ENTER)
8. Вставляем -
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR) ;Регистрирует сам плагин
9. На след. строчке вставляем -
menu = menu_create("\wваш текст^n\wваш текст^n\yваш текст^n","func_menu");
10. Делаем 2 отступа (2 раза ENTER) и вставляем -
menu_additem( menu, "\wваш текст \y[\rваш текст\y]")
menu_additem( menu, "\wваш текст \y[\rваш текст\y]")
menu_additem( menu, "\wваш текст \y[\rваш текст\y]")
menu_additem( menu, "\wваш текст \y[\rваш текст\y]")
menu_additem( menu, "\wваш текст \y[\rваш текст\y]")
menu_additem( menu, "\wваш текст \y[\rваш текст\y]")
menu_additem( menu, "\wваш текст \y[\rваш текст\y]")
11. Делаем 3 отступа (3 раз ENTER) и вставляем -
menu_setprop( menu, MPROP_NEXTNAME, "Дальше")
menu_setprop( menu, MPROP_BACKNAME, "Назад")
menu_setprop( menu, MPROP_EXITNAME, "Выход")
12. Делаем 2 отступа (2 раза ENTER) и вставляем -
register_clcmd("menu_priv","go_menu");
} ;Регистрация команды для вызова самого меню
public client_authorized(id)
{
client_cmd(id, "bind ^"F4^" ^"Menu^"")
} ;Бинд на F4 (или что-то похожее я честно не знаю)
13. Делаем 2 отступа (2 раза ENTER) и вставляем -
public func_menu(id, menu, key)
{
key++
if(key==1) client_cmd(id, "команда открытия меню")
if(key==2) client_cmd(id, "команда открытия меню")
if(key==3) client_cmd(id, "команда открытия меню")
if(key==4) client_cmd(id, "команда открытия меню")
if(key==5) client_cmd(id, "команда открытия меню")
if(key==6) client_cmd(id, "команда открытия меню")
if(key==7) client_cmd(id, "команда открытия меню")
}
12. Делаем 2 отступа (2 раза ENTER) и вставляем -
public go_menu(id)
{
menu_display(id,menu)
return PLUGIN_HANDLED
}
13. Сохраняем наш исходник сочетанием клавиш - CTRL+S
14. Переходим на сайт-компилятор -
( Ссылка - Компилятор-Онлайн )
15. Выбираем наш исходник (menu.sma)
16. Нажимаем принять
17. Скачиваем наш готовый плагин и ставим на сервер
P.s.Не судите строго,впервые связываюсь с описание статьи :)
Вы так же можете сделать другое меню я не настаиваю :D
%25
Discount on all purchases
builds until September 16, 2024
Especially for you - Гость
Buy an assembly
[CS 1.6] Weapon Model - Ethereal Xmas
one of the best p90 models, we had on the server. ++
[CS 1.6] Knife Model - Xmas Candy Axe
nice xmas model
[CS 1.6] Weapon Model - White Railcannon Xmas
Nice model thanks
[CS 1.6] Weapon Model - Royale Dragon M4a1
Nice model thanks
[ZP] Zombie Class - Revenant Raving (Переделка Fire)
happy to hear that from you ! enjoy
ReHLDS (Reverse-engineered) - this is a new step forward that gives a second wind to our servers. ReHLDS works 2 times faster than HLDS.
AMXModX is a Metamod add-on that allows you to create new modifications for Half-Life in the Pawn language
Reunion is a continuation of Dproto for ReHLDS. This is a metamod plugin that allows you to log into the 47/48 Non-Steam server.
Revoice is a Metamod plugin that allows voice chat between non-steam and steam clients.
The new Metamod-r contains a huge number of performance optimizations and much cleaner code. The kernel was written using a JIT compiler.
Ultimate Unprecacher is a plugin for MetaMod, it works on the principle of disabling unnecessary resources on your server, thereby you can free up space for resources for your plugins, using this module you can get rid of error 512!
ReAuthCheck - this is a Metamod plugin that checks your players for validity, with this module for REHLDS you can protect your server from bots that constantly spam ads or simply clog up a slot on the server!
NetBufExtender or NBEX - This is a metamod plugin that expands the пїЅInternet bufferпїЅ: server and client buffers (not 100% guaranteed). Expands up to 64 kb. This means that players are less likely to be kicked with the error "Reliable channel overflowed"".
UINO пїЅ metamod plugin that allows you to remove unnecessary fields from userinfo(setinfo) when the engine passes it to other players on the server. This measure reduces the amount of data transferred and slightly reduces the chance of being kicked with "Reliable channel overflowed".