Error plugin server_menu

Сообщения
283
Реакции
28
Помог
2 раз(а)
Ошибка
L 02/17/2021 - 13:11:36: Start of error session.
L 02/17/2021 - 13:11:36: Info (map "de_amr") (file "addons/amxmodx/logs/error_20210217.log")
L 02/17/2021 - 13:11:36: Player 27 is not in game.
L 02/17/2021 - 13:11:36: [AMXX] Displaying debug trace (plugin "server_menu.amxx", version "1.5.0")
L 02/17/2021 - 13:11:36: [AMXX] Run time error 10: native error (native "menu_display")
L 02/17/2021 - 13:11:36: [AMXX] [0] server_menu.sma::player_menu (line 119)
ОС
Linux
Amx Mod X
AMX Mod X 1.9.0.5271 (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: Jun 24 2020 13:53:30
Built from: https://github.com/alliedmodders/amxmodx/commit/5eea3e5
Build ID: 5271:5eea3e5
Core mode: JIT+ASM32
Билд
ReHLDS version: 3.8.0.711-dev
Build date: 13:13:38 Feb 6 2021 (2492)
Build from: https://github.com/dreamstalker/rehlds/commit/722e19d
ReGamedll
ReGameDLL version: 5.20.0.492-dev
Build date: 15:26:35 Jan 4 2021
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/aae507c
Версия Metamod
Metamod-r v1.3.0.128, API (5:13)
Metamod-r build: 17:47:54 Aug 24 2018
Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/0cf2f70
Список метамодулей
description stat pend file vers src load unload
[ 1] Reunion RUN - reunion_mm_i386.so v0.1.92d ini Start Never
[ 2] ReAuthCheck RUN - reauthcheck_mm_i386.so v0.1.6 ini Start Never
[ 3] Rechecker RUN - rechecker_mm_i386.so v2.5 ini Chlvl ANY
[ 4] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5271 ini Start ANY
[ 5] ReSemiclip RUN - resemiclip_mm_i386.so v2.3.9 ini Chlvl ANY
[ 6] WHBlocker RUN - whblocker_mm_i386.so v1.5.696 ini Chlvl ANY
[ 7] ReSRDetector RUN - resrdetector_mm_i386.so v0.1.0 ini Chlvl ANY
[ 8] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[ 9] MySQL RUN - mysql_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[10] ReAPI RUN - reapi_amxx_i386.so v5.19.0.211-dev pl4 ANY Never
[11] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5263 pl4 ANY ANY
[12] Engine RUN - engine_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[13] CSX RUN - csx_amxx_i386.so v1.9.0.5263 pl4 ANY ANY
[14] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[15] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl4 ANY Never
[16] GeoIP RUN - geoip_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[17] Fun RUN - fun_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
17 plugins, 17 running
Список плагинов
Currently loaded plugins:
name version author file status
[ 1] FreshBans 1.4.3b kanagava fresh_bans_143_ running
[ 2] WebHS 0.1 kanagava fb_web_online.a running
[ 3] fb_forwards 0.1.4 Kanagava & Realu fb_forwards.amx running
[ 4] Team Select 1.5.0 F@nt0M teamselect.amxx running
[ 5] [190] Cvar On Map 20.06.06 SKAJIbnEJIb cvar_on_map.amx running
[ 6] Gag System 1.1 TheRedShoko @ AM gag_system.amxx running
[ 7] [SQL] Chat Manager 1.1.1-13 Mistrick chatmask.amxx running
[ 8] Chat Manager: Addon 0.0.4-70 Mistrick chatmanager_add running
[ 9] [ReAPI] Anti overflow 1.0 Some Author antioverflow.am running
[ 10] [190] Damager RBS 20.06.06 SKAJIbnEJIb damager_rbs.amx running
[ 11] Advanced Mute 2.1 OciXCrom crx_advmute.amx running
[ 12] Advanced Experience Sy 0.5.9 [REA serfreeman1337/s aes_main.amxx running
[ 13] AES: CStrike Addon 0.5.9 [REA serfreeman1337/s aes_exp_cstrike running
[ 14] AES: Informer 0.5.9 [REA serfreeman1337/s aes_informer.am running
[ 15] AES: Admin Tools 0.5.9 [REA serfreeman1337/s aes_exp_editor. running
[ 16] AES: Bonus System 0.5.9 Vega serfreeman1337/s aes_bonus_syste running
[ 17] AES: Bonus CSTRIKE 0.5.9.1 [R serfreeman1337/s aes_bonus_cstri running
[ 18] AES Bonus: Flags 0.2 Sonyx aes_bonus_flags running
[ 19] AES: StatsX 0.5+1 serfreeman1337 aes_statsx_cstr running
[ 20] CSStatsX SQL 0.7.4+2 serfreeman1337 csstatsx_sql.am debug
[ 21] Admin Load 3.9.3 Dev F@nt0M adminload.amxx running
[ 22] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 23] Lista admini (amx_who) cs.leaguec Kobra whobun.amxx running
[ 24] unknown unknown unknown flash.amxx running
[ 25] Team Transfer 2.1 UnFoRgIvEn transfer_chat.a running
[ 26] MOTD Commands 1.3 OciXCrom crx_motdcommand running
[ 27] Admin Commands 1.9.0.5271 AMXX Dev Team admincmd.amxx running
[ 28] Commands Menu 1.9.0.5271 AMXX Dev Team cmdmenu.amxx running
[ 29] Menus Front-End 1.9.0.5271 AMXX Dev Team menufront.amxx running
[ 30] SHOW IP + LAST IP 2.0 Alka + x amx_showip_last running
[ 31] Players Menu 1.7 neugomon players_menu.am running
[ 32] Pause Plugins 1.9.0.5271 AMXX Dev Team pausecfg.amxx running
[ 33] Admin Help 1.9.0.5271 AMXX Dev Team adminhelp.amxx running
[ 34] Plugin Menu 1.9.0.5271 AMXX Dev Team pluginmenu.amxx running
[ 35] Admin Chat 1.8.1.3746 AMXX Dev Team adminchat.amxx running
[ 36] Private Message: Core 1.5 Denzer private_message running
[ 37] Private Message: Loggi 1.3 Denzer private_message running
[ 38] Items Restrict 1.1 s1lent items_restrict. running
[ 39] Server Menu 1.5.0 F@nt0M server_menu.amx debug
[ 40] Advanced Spam Nick Cha 0.2 Fullserver advanced_spam_n running
[ 41] Multi-Lingual System 1.9.0.5271 AMXX Dev Team multilingual.am running
[ 42] Whatsapp_Group_Request 3.2 CrAzY MaN whatsapp_group_ running
[ 43] SERVER TASKS 2.0 HATTRICK (HTTRCK server_tasks.am running
[ 44] Stats Configuration 1.9.0.5271 AMXX Dev Team statscfg.amxx running
[ 45] unknown unknown unknown fake.amxx running
[ 46] CS AFK Manager 1.0.6 (amx Freeman afk_manager_1-8 running
[ 47] Ping Faker 1.5a MeRcyLeZZ pingfaker_count running
[ 48] Ultimele Harti 1.0 M@$t3r_@dy harti.amxx running
[ 49] CFG Slash 1.0 aNNakin cfg_slash.amxx running
[ 50] Fall Damage HP Restore 0.0.1 Vaqtincha FallDamageHpRes running
[ 51] WeaponState Remember 0.0.4 Vaqtincha weaponstate_rem running
[ 52] Activitate Admini 2.0c Askhanar activitate_admi running
[ 53] ResetScore 1.0 Leo_[BH] resetscore_reap running
[ 54] Reklama 09.07.2019 mx?! reklama.amxx running
[ 55] [190] Warmup RBS 20.08.08 SKAJIbnEJIb warmup_rbs.amxx running
[ 56] [190] Ultimate Flags 20.06.06 SKAJIbnEJIb ultimate_flags. running
[ 57] Slap/Slay Team 1.0 Kobra slaylslapteam.a running
[ 58] Invisible Spectator 1.0 ReHLDS Team invisible_spect running
[ 59] Check Vip 2.0 Leo_[BH] check.amxx running
[ 60] Map Manager: Core 3.0.7 Mistrick map_manager_cor running
[ 61] Map Manager: Scheduler 0.1.5 Mistrick map_manager_sch running
[ 62] Map Manager: Nominatio 0.1.2 Mistrick map_manager_nom running
[ 63] Map Manager: BlockList 0.0.3 Mistrick map_manager_blo running
[ 64] Map Manager: Online so 0.0.2 Mistrick map_manager_onl running
[ 65] Map Manager: Effects 0.0.9 Mistrick map_manager_eff running
[ 66] Map Manager: Informer 0.0.5 Mistrick map_manager_inf running
[ 67] Map Manager: Advanced 0.0.5 Mistrick map_manager_adv running
[ 68] Map Manager: Online ch 1.0.0 Sergey Shorokhov map_manager_onl running
[ 69] FocusOnVotemap 1.2.1 Boec[SpecOPs] focus_on_votema running
[ 70] Voiceserver Connect 1.1.015 Nextra voiceserver_con running
[ 71] Hide 1.1 xPaw hidexpaw.amxx running
[ 72] M_AntiRusher 2.83 Miczu xPaw_Antirusher running
[ 73] Say Me And HP 1.0 Javekson say_me_hp.amxx debug
[ 74] [ReAPI] Info Killer 1.1.0 Jumper Info_Killer.amx debug
[ 75] Save score & money 1.2.4 Minni Mouse Save_Score_and_ running
[ 76] Boost Server Payment 1.0 JazZ. boostsv.amxx running
[ 77] Hostname Timeleft 1.0 xPaw HostnameTimelef running
[ 78] [ReAPI] Block 'Fire in 0.0.1 sergrib simpleblockfith running
[ 79] Team Grenade Trail 1.2 Numb team_grenade_tr running
[ 80] Write MS 0.1 ill log_ms.amxx running
[ 81] Advanced Kill Assists 0.9 Spection lite_kill_assis debug
[ 82] Top Awards 0.2cx Safety1st top_awards2.amx running
[ 83] [ReApi] Killer ScreenF 0.0.4 Vaqtincha reapi_killer_sc running
[ 84] Steam Bonus 1.1 ill+F@nToM steam_bonus_a2. running
[ 85] [190] Snipers RBS 20.06.06 SKAJIbnEJIb snipers_rbs.amx running
[ 86] [ReAPI] Kills Counter 0.3 serfreeman1337 kills_counter.a running
[ 87] Online Logger 1.0.3 mx?! online_logger.a running
[ 88] Real Game Time 1.0 mx?! real_game_time. running
[ 89] Game Messages & Sounds 3.0.1 OciXCrom crx_gamemessage running
[ 90] [190] C4 Destroyer 20.08.30 SKAJIbnEJIb c4_destroyer.am running
[ 91] Bet 2.2 Filip Vilicic bet.amxx running
[ 92] Style C4 Timer 3.0 OciXCrom crx_c4timer.amx running
[ 93] [190] Stimulation RBS 20.06.06 SKAJIbnEJIb stimulation_rbs running
[ 94] Slay Losers 1.1.6 [email protected] slay_losers.amx running
[ 95] Quick and No Scope Det 1.2 EFFx QuickNoScopeD.a running
[ 96] V.I.P Custom Weapons 1.0.0 Vaqtincha vip_custom.amxx running
96 plugins, 96 running
Автор плагина
F@nt0M
Версия плагина
1.5.0
Исходный код
#pragma semicolon 1

#define ADMINLOAD
#define TIMELEFT
// #define ENABLE_CALLFUNC
// #define BIND_MENU
#define ENABLE_INFO
#define INFO_FREQ 30.0

#include <amxmodx>

#if defined ADMINLOAD
#include <adminload>
#endif

#if defined TIMELEFT
#include <timeleft>
#endif

#if !defined charsmax
#define charsmax(%1) (sizeof(%1) - 1)
#endif

#if defined ADMINLOAD
new bool:g_AdminLoaded = true;
#endif

new g_ServerName[128];
new g_ServerAddress[32];

new bool:g_Enable = false;
new g_PlayerMenu;
new g_AdminMenu;

public plugin_init()
{
register_plugin("Server Menu", "1.5.0", "F@nt0M");

register_dictionary("server_menu.txt");
register_dictionary("common.txt");
#if defined TIMELEFT
register_dictionary("timeleft_custom.txt");
#endif

register_clcmd("amxmodmenu", "admin_menu", ADMIN_MENU);

register_clcmd("menu", "player_menu");
register_clcmd("say /menu", "player_menu");
register_clcmd("say_team /menu", "player_menu");
register_concmd("nightvision", "player_menu");
}

public plugin_cfg()
{
get_pcvar_string(get_cvar_pointer("hostname"), g_ServerName, 127);
get_user_ip(0, g_ServerAddress, 31);

g_PlayerMenu = menu_create("player_menu", "menu_handler");
configMenu(g_PlayerMenu, false);

g_AdminMenu = menu_create("admin_menu", "menu_handler");
configMenu(g_AdminMenu, false);

if (loadMenu()) {
g_Enable = true;
#if defined ENABLE_INFO
set_task(INFO_FREQ, "task_hudmsg", _, _, _, "b");
#endif
}
}

public plugin_end()
{
menu_destroy(g_PlayerMenu);
menu_destroy(g_AdminMenu);
}

#if defined ADMINLOAD
public plugin_natives()
{
set_native_filter("native_filter");
}

public native_filter(const name[], index, trap)
{
#pragma unused index
if (!strcmp(name, "adminload_get_expired")) {
g_AdminLoaded = trap ? true : false;
}

return trap ? PLUGIN_CONTINUE : PLUGIN_HANDLED;
}
#endif

#if defined BIND_MENU
public client_putinserver(id)
{
if (g_Enable) {
execCmd(id, "bind ^"F3^" ^"menu^"");
}

if (get_user_flags(id) & ADMIN_MENU) {
execCmd(id, "bind ^"=^" ^"amxmodmenu^"");
}
}
#endif

#if defined ENABLE_INFO
public task_hudmsg()
{
set_hudmessage(0, 255, 0, -1.0, 0.0, 0, 6.0, 6.0);
show_hudmessage(0, "%L", LANG_SERVER, "SERVER_MENU_HELP");
}
#endif

public player_menu(id)
{
if (g_Enable) {
menu_display(id, g_PlayerMenu, 0);
}

return PLUGIN_HANDLED;
}

public admin_menu(id, level)
{
if (~get_user_flags(id) & level) {
client_print(id, print_console, "You have no right to this command");
return PLUGIN_HANDLED;
}

#if defined ADMINLOAD
if (g_AdminLoaded) {
static expired, title[128];
#if defined TIMELEFT
static timeleft[64];
expired = get_expired_days(id, timeleft, charsmax(timeleft));
#else
expired = get_expired_days(id);
#endif
if (expired > 0) {
#if defined TIMELEFT
formatex(title, 127, "%L^n%L", LANG_SERVER, "SERVER_MENU_ADMIN", LANG_SERVER, "ADMIN_EXPIRED", timeleft);
#else
formatex(title, 127, "%L^n%L", LANG_SERVER, "SERVER_MENU_ADMIN", LANG_SERVER, "ADMIN_EXPIRED_DAYS", (expired / 86400));
#endif
} else{
formatex(title, 127, "%L", LANG_SERVER, "SERVER_MENU_ADMIN");
}

menu_setprop(g_AdminMenu, MPROP_TITLE, title);
}
#endif

menu_display(id, g_AdminMenu, 0);

return PLUGIN_HANDLED;
}

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

new access, command[128], title[128], callback;
menu_item_getinfo(menu, item, access, command, charsmax(command), title, charsmax(title), callback);

// log_amx("Player %d, Cmd: ^"%s^"", id, command);

#if defined ENABLE_CALLFUNC
if (contain(command, ":")) {
strtok(command, title, charsmax(title), command, charsmax(command), ':');
callfunc(id, command, title);
} else {
execCmd(id, command);
}
#else
execCmd(id, command);
#endif

return PLUGIN_CONTINUE;
}

bool:loadMenu()
{
new configFile[128];
new text[512], title[128], command[128], access_str[10], access;

get_localinfo("amxx_configsdir", configFile, charsmax(configFile));
add(configFile, charsmax(configFile), "/server_menu/server_menu.ini");

if (!file_exists(configFile)) {
log_amx("Could not found config file %s. Menu disable", configFile);
return false;
}

new menuCount = 0;
new bool:playerMenu = true;

new file = fopen(configFile, "r");
if (!file) {
log_amx("Could not open config file %s. Menu disable", configFile);
return false;
}

while (!feof(file)) {
fgets(file, text, charsmax(text));
trim(text);

if (!text[0] || text[0]==';' || (text[0]=='/' && text[1]=='/')) {
continue;
}

if (equali(text, "[PLAYER]")) {
playerMenu = true;
} else if (equali(text, "[ADMIN]")) {
playerMenu = false;
} else {

title[0] = '^0';
command[0] = '^0';
access_str[0] = '^0';

if (parse(text, title, charsmax(title), command, charsmax(command), access_str, charsmax(access_str)) > 1) {
access = access_str[0] ? read_flags(access_str) : 0;

// log_amx("Flags: ^"%s^", Title: ^"%s^", Command: ^"%s^", Access: %d", flags_str, title, command, access_str);

if (playerMenu) {
menu_additem(g_PlayerMenu, title, command, access);
menuCount++;
} else {
menu_additem(g_AdminMenu, title, command, access);
}
}
}
}

fclose(file);

if (menuCount == 0) {
log_amx("Load zero items from config. Menu disable");
return false;

}

log_amx("Load %d items from config. Menu enable", menuCount);
return true;
}

configMenu(menu, bool:adminmenu = false)
{
new text[256];

menu_setprop(menu, MPROP_PERPAGE, 7);

if (adminmenu) {
format(text, charsmax(text), "\y%L", LANG_SERVER, "SERVER_MENU_ADMIN", LANG_SERVER);
} else {
format(text, charsmax(text), "\y%L^n\d%L", LANG_SERVER, "SERVER_MENU_TITLE", g_ServerName, LANG_SERVER, "SERVER_MENU_IP", g_ServerAddress);
}
menu_setprop(menu, MPROP_TITLE, text);

format(text, charsmax(text), "%L", LANG_SERVER, "BACK");
menu_setprop(menu, MPROP_BACKNAME, text);

format(text, charsmax(text), "%L", LANG_SERVER, "MORE");
menu_setprop(menu, MPROP_NEXTNAME, text);

format(text, charsmax(text), "%L", LANG_SERVER, "EXIT");
menu_setprop(menu, MPROP_EXITNAME, text);
}

#if defined ADMINLOAD
#if defined TIMELEFT
stock get_expired_days(id, time[], len = 0)
#else
stock get_expired_days(id)
#endif
{
static expired;
expired = adminload_get_expired(id);

if (expired == 0) {
return 0;
}

expired -= get_systime(0);

#if defined TIMELEFT
static type, status;
new timeleft = timeleft_get_timeleft(expired, TIMELEFT_AUTO, type, status);
timeleft_format_timeleft(timeleft, type, status, time, len);
#endif

return expired;
}
#endif

#if defined ENABLE_CALLFUNC
stock bool:callfunc(id, function[128], plugin[128])
{
format(plugin, charsmax(plugin), "%s.amxx", plugin);

callfunc_begin(function, plugin);
callfunc_push_int(id);
callfunc_end();

return false;
}
#endif

execCmd(const id, const cmd[]) {
#define MAX_ARG_LENGTH 64
new args[3][MAX_ARG_LENGTH];

for (new i = 0, pos = 0; i < 3; i++) {
arrayset(args[i], 0, MAX_ARG_LENGTH);
if (pos >= 0) {
pos = argparse(cmd, pos, args[i], MAX_ARG_LENGTH - 1);
}
}

amxclient_cmd(id, args[0], args[1], args[2]);
}
.
 
Сообщения
2,491
Реакции
2,792
Помог
61 раз(а)
Плагин больше не поддерживается мной, как и любой другой когда ранее написаный мной. И вообше не рекомендую использовать мои плагины, когда есть более достойные альтернативы. Конкретно данный написаный давным давно и далек от статуса "хорошый плагин".
 

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

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