- Ошибка
-
Не отображается индивидуальный язык(который выбирает игрок) в меню через LANG_PLAYER. Показывает тот язык, который стоит по дефолту у сервера.
- ОС
- Windows
- Amx Mod X
-
1.9.0
- Билд
-
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.10.0.759-dev
Build date: 15:34:13 Jun 22 2021 (2628)
Build from: https://github.com/dreamstalker/rehlds/commit/ad6f6ad
- ReGamedll
-
ReGameDLL version: 5.21.0.540-dev
Build date: 17:32:55 Oct 25 2021
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/b9cccc6
- Версия 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] SafeNameAndChat RUN - safenameandchat.dll v1.1 ini ANY ANY
[ 2] Reunion RUN - reunion_mm.dll v0.1.0.137 ini Start Never
[ 3] ReAuthCheck RUN - reauthcheck_mm.dll v0.1.6 ini Start Never
[ 4] Revoice RUN - revoice_mm.dll v0.1.0.34 ini Start Never
[ 5] AMX Mod X RUN - amxmodx_mm.dll v1.9.0.5271 ini Start ANY
[ 6] Rechecker RUN - rechecker_mm.dll v2.5 ini Chlvl ANY
[ 7] ReSemiclip RUN - resemiclip_mm.dll v2.3.9 ini Chlvl ANY
[ 8] CStrike RUN - cstrike_amxx.dll v1.9.0.5271 pl5 ANY ANY
[ 9] Ham Sandwich RUN - hamsandwich_amxx.dll v1.9.0.5271 pl5 ANY ANY
[10] CSX RUN - csx_amxx.dll v1.9.0.5271 pl5 ANY ANY
[11] FakeMeta RUN - fakemeta_amxx.dll v1.9.0.5271 pl5 ANY ANY
[12] Fun RUN - fun_amxx.dll v1.9.0.5271 pl5 ANY ANY
12 plugins, 12 running
- Список плагинов
-
[ 1] Admin Base 1.9.0.5271 AMXX Dev Team admin.amxx running
[ 2] Admin Commands 1.9.0.5271 AMXX Dev Team admincmd.amxx running
[ 3] Admin Help 1.9.0.5271 AMXX Dev Team adminhelp.amxx running
[ 4] Slots Reservation 1.9.0.5271 AMXX Dev Team adminslots.amxx running
[ 5] Multi-Lingual System 1.9.0.5271 AMXX Dev Team multilingual.am running
[ 6] Menus Front-End 1.9.0.5271 AMXX Dev Team menufront.amxx running
[ 7] Commands Menu 1.9.0.5271 AMXX Dev Team cmdmenu.amxx running
[ 8] Players Menu 1.9.0.5271 AMXX Dev Team plmenu.amxx running
[ 9] Maps Menu 1.9.0.5271 AMXX Dev Team mapsmenu.amxx running
[ 10] Plugin Menu 1.9.0.5271 AMXX Dev Team pluginmenu.amxx running
[ 11] Admin Chat 1.9.0.5271 AMXX Dev Team adminchat.amxx running
[ 12] Anti Flood 1.9.0.5271 AMXX Dev Team antiflood.amxx running
[ 13] Scrolling Message 1.9.0.5271 AMXX Dev Team scrollmsg.amxx running
[ 14] Info. Messages 1.9.0.5271 AMXX Dev Team imessage.amxx running
[ 15] Admin Votes 1.9.0.5271 AMXX Dev Team adminvote.amxx running
[ 16] NextMap 1.9.0.5271 AMXX Dev Team nextmap.amxx running
[ 17] Nextmap Chooser 1.9.0.5271 AMXX Dev Team mapchooser.amxx running
[ 18] TimeLeft 1.9.0.5271 AMXX Dev Team timeleft.amxx running
[ 19] Pause Plugins 1.9.0.5271 AMXX Dev Team pausecfg.amxx running
[ 20] Stats Configuration 1.9.0.5271 AMXX Dev Team statscfg.amxx running
[ 21] Restrict Weapons 1.9.0.5271 AMXX Dev Team restmenu.amxx running
[ 22] StatsX 1.9.0.5271 AMXX Dev Team statsx.amxx running
[ 23] CS Misc. Stats 1.9.0.5271 AMXX Dev Team miscstats.amxx running
[ 24] CS Stats Logging 1.9.0.5271 AMXX Dev Team stats_logging.a running
[ 25] [AMXX] Settings API 1.0 MeRcyLeZZ amx_settings_ap running
[ 26] \r[Z]\wombie \r[P]\wla 4.4 MeRcyLeZZ | @bdu zombie_plague_s running
[ 27] [ZP] Assassin vs Snipe 1.2 @bdul! | [P]erfe zp_game_mode_as running
[ 28] [ZP] Nightmare Mode 1.1 @bdul! | [P]erfe zp_game_mode_ni running
[ 29] [ZP] Remix Mode 1.2 @bdul! | [P]erfe zpsp_game_mode_ running
[ 30] [ZP] Default Zombie Cl 4.3 Fix5 MeRcyLeZZ zpsp_zombie_cla running
[ 31] Menu System 0.1.2 serfreeman1337 menuSystem.amxx running
31 plugins, 31 running
- Автор плагина
- serfreeman1337
- Версия плагина
- v. 0.1.2
- Исходный код
-
/*
* Menu System v. 0.1.2
* by serfreeman1337 http://gf.hldm.org/
*/
#include <amxmodx>
#define PLUGIN "Menu System"
#define VERSION "0.1.2"
#define AUTHOR "serfreeman1337"
new Trie:sayCall
new Trie:cmdCall
enum _:menuItemStruct {
ISTRUCT_TITLE[128],
ISTRUCT_CMD[20]
}
public plugin_init(){
register_plugin(PLUGIN,VERSION,AUTHOR)
register_clcmd("say /help","Show_HelpMOTD")
register_dictionary("menusystem.txt")
}
public Show_HelpMOTD(id) {
show_motd(id,"help.txt","HELP")
}
public plugin_cfg(){
new cfgPath[512]
get_localinfo("amxx_configsdir",cfgPath,charsmax(cfgPath))
add(cfgPath,charsmax(cfgPath),"/menuSystem.ini")
new f = fopen(cfgPath,"r")
if(!f){
log_amx("confg file not found")
return PLUGIN_CONTINUE
}
new buffer[512],menuTitle[128],menuId = -1
while(!feof(f)){
fgets(f,buffer,charsmax(buffer))
trim(buffer)
if(!buffer[0] || buffer[0] == ';') // skip comments
continue
replace_all(buffer,charsmax(buffer),"^^n","^n") // do new lines
if(buffer[0] == '[' && buffer[strlen(buffer) - 1] == ']'){ // new menu entrie
formatex(menuTitle,strlen(buffer) - 2,"%s",buffer[1]) // parse menu title
new zagolovok[512]
formatex(zagolovok,512,"%L", "%s", menuTitle)
menuId = menu_create(zagolovok,"GlobalMenu_Handler") // create new menu
new itemText[128]
formatex(itemText,charsmax(itemText),"%L",LANG_SERVER,"BACK")
menu_setprop(menuId,MPROP_BACKNAME,itemText)
formatex(itemText,charsmax(itemText),"%L",LANG_SERVER,"MORE")
menu_setprop(menuId,MPROP_NEXTNAME,itemText)
formatex(itemText,charsmax(itemText),"%L",LANG_SERVER,"EXIT")
menu_setprop(menuId,MPROP_EXITNAME,itemText)
continue
}
if(menuId == -1)
continue
if(buffer[0] == '"'){ // read menu items
new mItem[menuItemStruct]
if(parse(buffer,mItem[ISTRUCT_TITLE],charsmax(mItem[ISTRUCT_TITLE]),
mItem[ISTRUCT_CMD],charsmax(mItem[ISTRUCT_CMD])) < 2) // not engought parameters
continue
new menuhuman[512]
formatex(menuhuman,512,"%L", "%s", mItem[ISTRUCT_TITLE]) //Изменение Ланга
menu_additem(menuId,menuhuman,mItem[ISTRUCT_CMD])
}else{ // read menu keys
new itemKey[10],itemValue[30]
#if AMXX_VERSION_NUM >= 183
strtok2(buffer,itemKey,charsmax(itemKey),itemValue,charsmax(itemValue),'=',TRIM_FULL)
#else
strtok(buffer,itemKey,charsmax(itemKey),itemValue,charsmax(itemValue),'=',1)
formatex(itemValue,charsmax(itemValue),itemValue[2])
#endif
if(strcmp(itemKey,"cmd") == 0){ // register menu call command
if(cmdCall == Invalid_Trie)
cmdCall = TrieCreate()
TrieSetCell(cmdCall,itemValue,menuId)
register_clcmd(itemValue,"GlobalCmd_Handler")
}else if(strcmp(itemKey,"say") == 0){ // register menu say call command
if(sayCall == Invalid_Trie)
sayCall = TrieCreate()
new sayCmd[64]
formatex(sayCmd,charsmax(sayCmd),"say %s",itemValue)
TrieSetCell(sayCall,itemValue,menuId)
register_clcmd(sayCmd,"GlobalCmd_Handler")
}
}
}
return PLUGIN_CONTINUE
}
// check item active
public GlobalMenu_Handler(id,m,item){
if(item == MENU_EXIT)
return PLUGIN_HANDLED
new acc[1],itemData[20]
menu_item_getinfo(m,item,acc[0],itemData,charsmax(itemData),acc,1,acc[0])
if(itemData[0])
client_cmd(id,itemData)
return PLUGIN_HANDLED
}
// call menu by command
public GlobalCmd_Handler(id){
new cmdArg[20],menuId = -1
read_argv(0,cmdArg,charsmax(cmdArg))
if(!TrieGetCell(cmdCall,cmdArg,menuId)){ // this is not command
if(strcmp(cmdArg,"say") == 0){ // this is say command
new sayArg[20]
read_argv(1,sayArg,charsmax(sayArg))
if(!TrieGetCell(sayCall,sayArg,menuId)) // no match found
return PLUGIN_HANDLED
}
}
if(menuId == -1)
return PLUGIN_HANDLED
// display menu
menu_display(id,menuId)
return PLUGIN_HANDLED
}
stock SendCmd_1( id , text[] ) {
message_begin( MSG_ONE, 51, _, id )
write_byte( strlen(text) + 2 )
write_byte( 10 )
write_string( text )
message_end()
}
Не отображается индивидуальный язык(который выбирает игрок) в меню через LANG_PLAYER. Показывает тот язык, который стоит по дефолту у сервера (То есть, если на сервере стоит русский, то меню будет показываться на русском).
В этой теме было размещено решение! Перейти к решению.
Download all Attachments
-
241 байт Просмотры: 120
-
653 байт Просмотры: 111