Cannot set 9 items per page

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
95
Реакции
6
Помог
2 раз(а)
Ошибка
L 02/03/2019 - 17:52:27: Cannot set 9 items per page
L 02/03/2019 - 17:52:27: [AMXX] Displaying debug trace (plugin "test.amxx", version "1.0")
L 02/03/2019 - 17:52:27: [AMXX] Run time error 10: native error (native "menu_setprop")
L 02/03/2019 - 17:52:27: [AMXX] [0] test.sma::ShowMenu (line 24)
ОС
Windows
Amx Mod X
AMX Mod X 1.9.0.5235 (http://www.amxmodx.org)
Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: Dec 18 2018 01:20:16
Built from: https://github.com/alliedmodders/amxmodx/commit/6c53524d
Build ID: 5235:6c53524d
Core mode: JIT+ASM32
Билд
Protocol version 48
Exe version 1.1.2.7 (cstrike)
ReHLDS version: 3.4.0.668-dev
Build date: 09:47:42 Sep 29 2018 (1631)
Build from: https://github.com/dreamstalker/rehlds/commit/89be216
ReGamedll
ReGameDLL version: 5.7.0.319-dev
Build date: 10:52:38 Dec 23 2018
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/9d89a34
Версия Metamod
Metamod-r v1.3.0.128, API (5:13)
Metamod-r build: 15:47:38 Aug 24 2018
Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/0cf2f70
Список метамодулей
Currently loaded plugins:
description stat pend file vers src load unload
[ 1] AMX Mod X RUN - amxmodx_mm.dll v1.9.0.5235 ini Start ANY
[ 2] Ham Sandwich RUN - hamsandwich_amxx.dll v1.9.0.5235 pl1 ANY ANY
[ 3] CSX RUN - csx_amxx.dll v1.9.0.5235 pl1 ANY ANY
[ 4] Fun RUN - fun_amxx.dll v1.9.0.5235 pl1 ANY ANY
[ 5] CStrike RUN - cstrike_amxx.dll v1.9.0.5235 pl1 ANY ANY
[ 6] FakeMeta RUN - fakemeta_amxx.dll v1.9.0.5235 pl1 ANY ANY
6 plugins, 6 running
Список плагинов
Currently loaded plugins:
name version author file status
[ 1] Admin Base 1.9.0.5235 AMXX Dev Team admin.amxx running
[ 2] Admin Commands 1.9.0.5235 AMXX Dev Team admincmd.amxx running
[ 3] Admin Help 1.9.0.5235 AMXX Dev Team adminhelp.amxx running
[ 4] Slots Reservation 1.9.0.5235 AMXX Dev Team adminslots.amxx running
[ 5] Multi-Lingual System 1.9.0.5235 AMXX Dev Team multilingual.am running
[ 6] Menus Front-End 1.9.0.5235 AMXX Dev Team menufront.amxx running
[ 7] Commands Menu 1.9.0.5235 AMXX Dev Team cmdmenu.amxx running
[ 8] Players Menu 1.9.0.5235 AMXX Dev Team plmenu.amxx running
[ 9] Maps Menu 1.9.0.5235 AMXX Dev Team mapsmenu.amxx running
[ 10] Plugin Menu 1.9.0.5235 AMXX Dev Team pluginmenu.amxx running
[ 11] Admin Chat 1.9.0.5235 AMXX Dev Team adminchat.amxx running
[ 12] Anti Flood 1.9.0.5235 AMXX Dev Team antiflood.amxx running
[ 13] Scrolling Message 1.9.0.5235 AMXX Dev Team scrollmsg.amxx running
[ 14] Info. Messages 1.9.0.5235 AMXX Dev Team imessage.amxx running
[ 15] Admin Votes 1.9.0.5235 AMXX Dev Team adminvote.amxx running
[ 16] NextMap 1.9.0.5235 AMXX Dev Team nextmap.amxx running
[ 17] Nextmap Chooser 1.9.0.5235 AMXX Dev Team mapchooser.amxx running
[ 18] TimeLeft 1.9.0.5235 AMXX Dev Team timeleft.amxx running
[ 19] Pause Plugins 1.9.0.5235 AMXX Dev Team pausecfg.amxx running
[ 20] Stats Configuration 1.9.0.5235 AMXX Dev Team statscfg.amxx running
[ 21] StatsX 1.9.0.5235 AMXX Dev Team statsx.amxx running
[ 22] Menu System 0.1 Skiptik menu.amxx debug
[ 23] My Menu 1.0 Me test.amxx debug
23 plugins, 23 running
Автор плагина
Me
Версия плагина
1.0
Исходный код
#include <amxmodx>

public plugin_init()
{
register_plugin("My Menu", "1.0", "Me");
register_clcmd("say /1", "ShowMenu");
}

public ShowMenu(id)
{
new menu = menu_create("MyMenu", "mh_MyMenu");

menu_additem(menu, "Взять", "", 0); // case 0
menu_additem(menu, "Пистолет", "", 0); // case 1
menu_additem(menu, "Основное", "", 0); // case 2
menu_additem(menu, "Нож", "", 0); // case 3
menu_additem(menu, "Экеперовка", "", 0); // case 4
menu_additem(menu, "Выдать", "", 0); // case 5
menu_additem(menu, "Золотое оружие", "", 0); // case 6
menu_additem(menu, "Популярное оружие", "", 0); // case 7
menu_additem(menu, "Брать автоматически", "", 0); // case 8

menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_setprop(menu, MPROP_PERPAGE, 9);

menu_display(id, menu, 0);

return PLUGIN_HANDLED;
}

public mh_MyMenu(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_cancel(id);
return PLUGIN_HANDLED;
}

new command[6], name[64], access, callback;

menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);

switch(item)
{
case 0: client_print(id, print_chat, "You have selected Взять");
case 1: client_print(id, print_chat, "You have selected Пистолет");
case 2: client_print(id, print_chat, "You have selected Основное");
case 3: client_print(id, print_chat, "You have selected Нож");
case 4: client_print(id, print_chat, "You have selected Экеперовка");
case 5: client_print(id, print_chat, "You have selected Выдать");
case 6: client_print(id, print_chat, "You have selected Золотое оружие");
case 7: client_print(id, print_chat, "You have selected Популярное оружие");
case 8: client_print(id, print_chat, "You have selected Брать автоматически");
}

menu_destroy(menu);

return PLUGIN_HANDLED;
}
Как создавать 9 элементов на одной странице?
 
В этой теме было размещено решение! Перейти к решению.
Сообщения
95
Реакции
6
Помог
2 раз(а)
w0w, Спасибо, решено. Закрывайте.
 
Сообщения
1,701
Реакции
1,512
Помог
26 раз(а)
Какая всё-таки убогая "новая" система меню в амхх.
 
Статус
В этой теме нельзя размещать новые ответы.

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу