Server stops reading amxx.cfg when I use this plugin

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
290
Реакции
28
Помог
2 раз(а)
Ошибка
Server stops reading amxx.cfg when I use this languages menu
ОС
Linux
Amx Mod X
AMX Mod X 1.9.0.5221 (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: Sep 20 2018 15:06:02
Built from: https://github.com/alliedmodders/amxmodx/commit/e059c1f
Build ID: 5221:e059c1f
Core mode: JIT+ASM32
Билд
Protocol version 48
Exe version 1.1.2.7/Stdio (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.322-dev
Build date: 11:41:14 Jan 13 2019
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/7398bb7
Версия 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
Список метамодулей
Currently loaded plugins:
description stat pend file vers src load unload
[ 1] SafeNameAndChat RUN - SafeNameAndChat.so v1.1 ini ANY ANY
[ 2] Reunion RUN - reunion_mm_i386.so v0.1.0.92 ini Start Never
[ 3] ReAuthCheck RUN - reauthcheck_mm_i386.so v0.1.6 ini Start Never
[ 4] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5221 ini Start ANY
[ 5] ReSemiclip RUN - resemiclip_mm_i386.so v2.3.9 ini Chlvl ANY
[ 6] Rechecker RUN - rechecker_mm_i386.so v2.5 ini Chlvl ANY
[ 7] WHBlocker RUN - whblocker_mm_i386.so v1.5.696 ini Chlvl ANY
[ 8] ReSRDetector RUN - resrdetector_mm_i386.so v0.1.0 ini Chlvl ANY
[ 9] ReAPI RUN - reapi_amxx_i386.so v5.8.0.163-dev pl4 ANY Never
[10] hackdetector RUN - hackdetector_amxx_i386.so v0.15.328.lite pl4 ANY ANY
[11] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl4 ANY Never
[12] Hide Cvars RUN - hidecvars_amxx_i386.so v1.0 pl4 ANY ANY
[13] Engine RUN - engine_amxx_i386.so v1.9.0.5221 pl4 ANY ANY
[14] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5221 pl4 ANY ANY
[15] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5221 pl4 ANY ANY
[16] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5221 pl4 ANY ANY
[17] GeoIP RUN - geoip_amxx_i386.so v1.9.0.5221 pl4 ANY ANY
[18] CSX RUN - csx_amxx_i386.so v1.9.0.5221 pl4 ANY ANY
[19] Fun RUN - fun_amxx_i386.so v1.9.0.5221 pl4 ANY ANY
19 plugins, 19 running
Список плагинов
[  1] ReAimDetector API       0.2.2       ReHLDS Team       reaimdetector.a  running  
[ 2] Advanced Bans 0.8.1 Exolent advanced_bans.a running
[ 3] Lista admini (amx_who) 1.0 Kobra whopro.amxx running
[ 4] Force Gag 1.2 zorken zilla_gag.amxx running
[ 5] Accuracy Fix 3.0 Numb accuracy_fix.am running
[ 6] Say me and Say hp 1.4 neygomon sayme.amxx running
[ 7] unknown unknown unknown flash.amxx running
[ 8] Team Transfer 2.1 UnFoRgIvEn transfer_chat.a running
[ 9] Motd System 1.0 Hypa_[KZ] motd_system.amx running
[ 10] MOTD Commands 1.3 OciXCrom crx_motdcommand running
[ 11] Admin Base 1.9.0.5221 AMXX Dev Team admin.amxx running
[ 12] Admin Commands 1.9.0.5221 AMXX Dev Team admincmd.amxx running
[ 13] Commands Menu 1.9.0.5221 AMXX Dev Team cmdmenu.amxx running
[ 14] Menus Front-End 1.9.0.5221 AMXX Dev Team menufront.amxx running
[ 15] SHOW IP + LAST IP 2.0 Alka + x amx_showip_last running
[ 16] Players Menu 1.9.0.5221 AMXX Dev Team plmenu.amxx running
[ 17] Pause Plugins 1.9.0.5221 AMXX Dev Team pausecfg.amxx running
[ 18] Admin Help 1.9.0.5221 AMXX Dev Team adminhelp.amxx running
[ 19] Multi-Lingual System 1.9.0.5221 AMXX Dev Team multilingual.am running
[ 20] Plugin Menu 1.9.0.5221 AMXX Dev Team pluginmenu.amxx running
[ 21] Admin Votes 1.9.0.5221 AMXX Dev Team adminvote.amxx running
[ 22] HUD Message 1.5 neygomon hud_message.amx running
[ 23] Admin Chat 1.8.1.3746 AMXX Dev Team adminchat.amxx running
[ 24] Private Message 0.5 Denzer pm.amxx running
[ 25] Items Restrict Ultimat 0.0.4 Vaqtincha items_restrict_ running
[ 26] AES: StatsX 0.5 Vega serfreeman1337 aes_statsx_cstr running
[ 27] StatsX 1.9.0.5221 AMXX Dev Team statsx.amxx running
[ 28] Restricted Names 1.1 Hattrick JM3Ch3R nick.amxx running
[ 29] Stats Configuration 1.9.0.5221 AMXX Dev Team statscfg.amxx running
[ 30] Autoresponder/Advertis 0.5 MaximusBrood ads.amxx running
[ 31] AFK Control ReNew 1.2(a) neygomon afk_control.amx running
[ 32] Bomb Count Down HUD/Vo 0.2 RuS Mawe4ka117 bcd_hudvoice_ti running
[ 33] Ping Faker 1.5a MeRcyLeZZ pingfaker_count running
[ 34] unknown unknown unknown fake.amxx running
[ 35] Ultimele Harti 1.0 M@$t3r_@dy harti.amxx running
[ 36] CFG Slash 1.0 aNNakin cfg_slash.amxx running
[ 37] Top Round Damage 1.0.1 ReAP Dager* *.* -G- damage.amxx debug
[ 38] Fall Damage HP Restore 0.0.1 Vaqtincha FallDamageHpRes running
[ 39] WeaponState Remember 0.0.4 Vaqtincha weaponstate_rem running
[ 40] GameName Wins 0.7.1 w0w gamenamee.amxx running
[ 41] Kills Counter 0.3 serfreeman1337 kills_counter.a running
[ 42] Weapon Icon 1.2 hoboman313/Zenix weapon_icon.amx running
[ 43] Dead Messages 1.1 maFFyoZZyk deadmessages.am running
[ 44] Activitate Admini 2.0c Askhanar activitate.amxx running
[ 45] ResetScore 1.0 Leo_[BH] resetscore_reap running
[ 46] Auto Round Restart 1.0 LondoN eXtream restartr.amxx running
[ 47] Drop Pistols on Death 0.0.4 Vaqtincha reapi_dead_pist running
[ 48] Night VIP 1.0 TBONTB vipfreenoaptea. running
[ 49] Online Logger 06.04.18 mx?! online_logger.a running
[ 50] Slap/Slay Team 1.0 Kobra slaylslapteam.a running
[ 51] VIP Menu [CS.PLAY-AREN 0.15 Leo_[BH] vip.amxx running
[ 52] Bullet Damage 0.0.1 ConnorMcLeod bullet.amxx running
[ 53] Color Flash Screen 1.6.4 Radius (Stimul i color_flash_scr running
[ 54] Invisible Spectator 1.0 ReHLDS Team invisible_spect running
[ 55] Ultimate Fire in the H 2.0 OciXCrom crx_fireintheho running
[ 56] Check Vip 2.0 Leo_[BH] check.amxx running
[ 57] Slay Losers 1.1.6 [email protected] slay_losers.amx running
[ 58] OciXCrom's Rank System 2.7.1 OciXCrom crx_ranksystem. running
[ 59] CRXRanks: Flags Per Le 1.1 OciXCrom crxranks_flags_ running
[ 60] CRXRanks: Happy Hour 1.0 OciXCrom crxranks_happyh running
[ 61] Best Player MOTD 1.2.1 OciXCrom crx_bestplayer. running
[ 62] Simple Menu 2.1.1 OciXCrom crx_simplemenu. running
[ 63] Night Mode 1.2.3 Radius night_mode.amxx running
[ 64] Chat Manager 4.3.1 OciXCrom crx_chatmanager running
[ 65] CM: Toggle Chat 4.1 OciXCrom crx_chatmanager running
[ 66] Whatsapp_Group_Request 3.2 CrAzY MaN whatsapp_group_ running
[ 67] Quick and No Scope Det 1.2 EFFx QuickNoScopeD.a running
[ 68] Advanced Lottery 0.5 Nordic Warrior advanced_lotter running
[ 69] Map Manager: Core 3.0.0 Mistrick map_manager_cor running
[ 70] Map Manager: Scheduler 0.1.0 Mistrick map_manager_sch running
[ 71] Map Manager: Rtv 0.0.4 Mistrick map_manager_rtv running
[ 72] Map Manager: Nominatio 0.0.8 Mistrick map_manager_nom running
[ 73] Map Manager: BlockList 0.0.3 Mistrick map_manager_blo running
[ 74] Map Manager: Online so 0.0.2 Mistrick map_manager_onl running
[ 75] Map Manager: Effects 0.0.8 Mistrick map_manager_eff running
[ 76] Map Manager: Informer 0.0.5 Mistrick map_manager_inf running
[ 77] Map Manager: Advanced 0.0.4 Mistrick map_manager_adv running
[ 78] Auto Team Balance Adva 1.5.1 Radius auto_team_balan running
[ 79] Team Select 1.5.0 F@nt0M teamselect.amxx running
79 plugins, 79 running
Автор плагина
fantom
Версия плагина
1.0
Исходный код
#include <amxmodx>
#include <fakemeta>
#include <nvault>

#define MAX_LANGS_NUM 9
#define MAX_LANG_KEY_LENGTH 3
#define MAX_LANG_NAME_LENGTH 32

enum _:LANG {
LANG_KEY[MAX_LANG_KEY_LENGTH],
LANG_NAME[MAX_LANG_NAME_LENGTH]
}

new g_Langs[MAX_LANGS_NUM][LANG], g_LangsNum;

new g_DefaultLang;
new g_PlayersSettings;
new g_PlayersLang[MAX_PLAYERS + 1];

public plugin_init() {
register_plugin("Language Menu", "1.0", "F@nt0M");
register_dictionary("langmenu.txt");

// register_forward(FM_ClientUserInfoChanged, "ClientUserInfoChanged_Post", true);

register_menucmd(register_menuid("LANGMENU"), 1023, "HandleMenu");
register_srvcmd("langmenu_add", "CmdAddLang");
register_srvcmd("langmenu_cmd", "CmdAddCmd");
register_clcmd("amx_langmenu", "CmdLangMenu");
register_cvar("langmenu_prune_days", "30");

new path[128];
get_localinfo("amxx_configsdir", path, charsmax(path));
server_cmd("exec %s/langmenu.cfg", path);
server_exec();

g_PlayersSettings = nvault_open("players_lang");
}

public plugin_cfg() {
if (g_LangsNum <= 0) {
set_fail_state("Fail to load config");
return;
}
set_cvar_num("amx_client_languages", 1);
new langKey[MAX_LANG_KEY_LENGTH];
get_cvar_string("amx_language", langKey, charsmax(langKey));
g_DefaultLang = findLangId(langKey);
if (g_DefaultLang == -1) {
g_DefaultLang = 0;
}

new days = get_cvar_num("langmenu_prune_days");
if (days > 0 && g_PlayersSettings != INVALID_HANDLE) {
nvault_prune( g_PlayersSettings , 0 , get_systime() - (days * 86400));
}
}

public plugin_end() {
if (g_PlayersSettings != INVALID_HANDLE) {
nvault_close(g_PlayersSettings);
}
}

public client_authorized(id) {
new authid[24], langKey[MAX_LANG_KEY_LENGTH + 1], lang;
get_user_authid(id, authid, charsmax(authid));
if (nvault_lookup(g_PlayersSettings, authid, langKey, charsmax(langKey), lang)) {
lang = findLangId(langKey);
if (lang != -1) {
setUserLang(id, lang, false);
nvault_touch(g_PlayersSettings, authid, -1);
} else {
setUserLang(id, g_DefaultLang, true);
}
} else {
get_user_info(id, "lang", langKey, charsmax(langKey))
lang = findLangId(langKey);
if (lang != -1) {
setUserLang(id, lang, false);
} else {
setUserLang(id, g_DefaultLang, true);
}
}
}

public CmdAddCmd() {
new cmd[32];
if (read_args(cmd, charsmax(cmd)) > 0) {
remove_quotes(cmd);
trim(cmd);
if (strlen(cmd) > 0) {
register_clcmd(cmd, "CmdLangMenu");
}
}

return PLUGIN_HANDLED;
}

public CmdAddLang() {
if (read_argc() < 2 || g_LangsNum >= MAX_LANGS_NUM) {
return PLUGIN_HANDLED;
}

read_argv(1, g_Langs[g_LangsNum][LANG_KEY], MAX_LANG_KEY_LENGTH);
read_argv(2, g_Langs[g_LangsNum][LANG_NAME], MAX_LANG_NAME_LENGTH);
g_LangsNum++;

return PLUGIN_HANDLED;
}

public CmdLangMenu(id) {
new keys = MENU_KEY_0;

new menu[512];
new len = formatex(menu, charsmax(menu), "\r%L^n^n", id, "LANG_MENU_TITLE");

for (new i = 0; i < g_LangsNum; i++) {
if (g_PlayersLang[id] == i) {
len += formatex(menu[len], charsmax(menu) - len, "\r[\y%i\r]\d %s \y(%L)^n", i + 1, g_Langs[i][LANG_NAME], id, "LANG_MENU_CURRENT");
} else {
keys |= (1 << i);
len += formatex(menu[len], charsmax(menu) - len, "\r[\y%i\r]\w %s^n", i + 1, g_Langs[i][LANG_NAME]);
}
}

formatex(menu[len], charsmax(menu) - len, "^n\r[\y0\r] \w%L", id, "LANG_MENU_CANCEL");
show_menu(id, keys, menu, -1, "LANGMENU");

return PLUGIN_HANDLED;
}

public HandleMenu(id, key) {
if (key == 9) {
return;
}

if (0 <= key < g_LangsNum) {
setUserLang(id, key, true);
client_print_color(id, print_team_default, "%L", id, "LANG_MENU_SAVED");
}
}

findLangId(const lang[]) {
for (new i = 0; i < g_LangsNum; i++) {
if (equal(g_Langs[i][LANG_KEY], lang)) {
return i;
}
}

return -1;
}

setUserLang(const id, const lang, const bool:save = false) {
g_PlayersLang[id] = lang;
new infobuffer = engfunc(EngFunc_GetInfoKeyBuffer, id);
engfunc(EngFunc_SetClientKeyValue, id, infobuffer, "lang", g_Langs[lang][LANG_KEY]);
if (save && g_PlayersSettings != INVALID_HANDLE) {
new authid[24], langKey[MAX_LANG_KEY_LENGTH];
get_user_authid(id, authid, charsmax(authid));
copy(langKey, charsmax(langKey), g_Langs[lang][LANG_KEY]);
nvault_set(g_PlayersSettings, authid, g_Langs[lang][LANG_KEY]);
}
}
I really like the idea of this plugin but unfortunately when I enable it the server stops executing amxx.cfg

EDIT: I tested a bit more and seems like the amxx.cfg file is executed (Executing AMX Mod X Configuration File ) but the weapons restrict plugins are not working in correct parameters somehow :

Items Restrict Ul 0.0.4 Vaqtincha items_restrict_ running
Restrict Weapons 1.10.0.525 AMXX Dev Team restmenu.amxx running

not restricting weapons even tho they are running... ( usually without langmenu.amxx the restriction is on point )

fantom
 
В этой теме было размещено решение! Перейти к решению.
Последнее редактирование:
Сообщения
290
Реакции
28
Помог
2 раз(а)
Kobra, so it doesn't matter if the plugin "Language Menu" by fantom is enabled?
Everything works fine without the plugin,but when I use langmenu plugin ( and also adminloader of fantom ) the weapons restrict plugin are not working in standard parameters ( they show as running in amxx plugins but they dont restrict anything )
 
Статус
В этой теме нельзя размещать новые ответы.

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

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