- Ошибка
-
./hlds_run: line 272: 29360 Segmentation fault (core dumped) $HL_CMD
- ОС
- 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
- Билд
-
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.8.0.703-dev-mpatch
Build date: 12:54:04 Nov 17 2020 (2411)
Build from: https://github.com/dreamstalker/rehlds/commit/954ec32
- ReGamedll
-
ReGameDLL version: 5.18.0.474-dev
Build date: 11:07:34 Jul 16 2020
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/efb06a7
- Версия Metamod
-
meta version
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.0.135 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] VoiceTranscoder RUN - VoiceTranscoder.so v2017RC5 ini ANY ANY
[ 5] WHBlocker RUN - whblocker_mm_i386.so v1.5.697 ini Chlvl ANY
[ 6] Ultimate Unprecacher RUN - unprecacher_i386.so vBeta 2.5.3 ini Chlvl Chlvl
[ 7] ReSemiclip RUN - resemiclip_mm_i386.so v2.3.9 ini Chlvl ANY
[ 8] ReSRDetector RUN - resrdetector_mm_i386.so v0.1.0 ini Chlvl ANY
[ 9] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5271 ini Start ANY
[10] AuthEmu RUN - authemu_amxx_i386.so v4.2.12.311-dev+m pl9 ANY Never
[11] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl9 ANY Never
[12] ReParachute RUN - parachute_amxx_i386.so v1.1 Beta pl9 ANY ANY
[13] MySQL RUN - mysql_amxx_i386.so v1.9.0.5271 pl9 ANY ANY
[14] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5271 pl9 ANY ANY
[15] Engine RUN - engine_amxx_i386.so v1.9.0.5271 pl9 ANY ANY
[16] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5271 pl9 ANY ANY
[17] ReAPI RUN - reapi_amxx_i386.so v5.16.0.198-dev pl9 ANY Never
[18] CSX RUN - csx_amxx_i386.so v1.9.0.5271 pl9 ANY ANY
[19] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5271 pl9 ANY ANY
19 plugins, 19 running
- Список плагинов
-
name version author file status
[ 1] GameCMS_API 5.3.5 zhorzh78 gamecms_api_5.3 running
[ 2] FreshBans 1.4.0b kanagava fresh_bans.amxx running
[ 3] fb_forwards 0.1.5 Kanagava & Realu fb_forwards.amx running
[ 4] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 5] Menu System 0.1.2 serfreeman1337 menuSystem.amxx running
[ 6] [190] Ultimate Weapons 20.06.06 SKAJIbnEJIb ultimate_weapon running
[ 7] [190] VIP RBS 20.07.20 SKAJIbnEJIb vip_rbs.amxx running
[ 8] [183] PTB RBS 17.10.30 Ptahhotep & SKAJ ptb_rbs.amxx running
[ 9] Damager 1.2 Cyanide damage2.amxx running
[ 10] [ReAPI] No Team Flash 0.0.2 Vaqtincha re_no_flash.amx running
[ 11] Advanced MapChooser 1.4 neygomon map_chooser.amx running
[ 12] Lite NightMode 1.1 neygomon lite_nightmode. running
[ 13] Auto-Give Privileges 1.0 SerGrib night_vip2.amxx running
[ 14] AuthEmu API 1.0 Dev-MS Team authemu.amxx running
[ 15] Maps Admin Menu 1.2 d3m37r4 maps_admin_menu running
[ 16] AFK Control 1.4.1 [Rnd neygomon afk_control.amx running
[ 17] [190] ESP RBS 20.06.06 SKAJIbnEJIb & Ko esp_rbs.amxx running
[ 18] Menus Front-End 1.5 neugomon menufront_end.a running
[ 19] Players Menu 1.7 neugomon players_menu.am running
[ 20] [ReVIP] Menu 0.1 pUzzlik vip_menu.amxx running
[ 21] [190] VoteBan RBS 20.06.06 SKAJIbnEJIb voteban_rbs.amx running
[ 22] [ReAPI] 1.0 Phantom reapi_rs.amxx running
[ 23] Ping Control 1.31 neygomon ping_control.am running
[ 24] GameCMS_GagManager 2.2.3 ReAP zhorzh78 gamecms_gagmana running
[ 25] From Rock to Ban 1.02 Safety1st++ rock2gag.amxx running
[ 26] [ReAPI] Healthnade 0.0.3 F@nt0M reapi_healthnad running
[ 27] Bomb Countdown HUD Tim 0.2 SAMURAI c4_timer.amxx running
[ 28] Team Select 1.5.0 F@nt0M teamselect.amxx running
[ 29] [183] Stimulation RBS 19.11.02 SKAJIbnEJIb stimulation_rbs running
[ 30] [190] Ultimate Informe 20.06.06 SKAJIbnEJIb ultimate_inform running
[ 31] [190] Army Ranks Ultim 20.06.06 SKAJIbnEJIb army_ranks_ulti running
[ 32] [190] CsStats MySQL 20.06.06 SKAJIbnEJIb csstats_mysql.a running
[ 33] [190] StatsX RBS 20.06.06 SKAJIbnEJIb & AM statsx_rbs.amxx running
[ 34] Stats Configuration 20.06.06 SKAJIbnEJIb & AM statscfg_rbs.am running
[ 35] [190] Skill ELO 20.06.06 SKAJIbnEJIb skill_elo.amxx running
[ 36] Auto Restart 1.0.3 neygomon auto_rr.amxx running
[ 37] DemoRecoder 1.1 neygomon amx_demorec.amx running
[ 38] Weapon Restrict 1.7 s1lent weapon_rest.amx running
[ 39] Block All Adverts 1.3 neygomon block_all_adver running
[ 40] [183] Chat RBS 19.12.23 SKAJIbnEJIb chat_rbs.amxx running
[ 41] Adverts 1.0 pUzzlik adverts_message running
[ 42] admin_jump 1.1 AUTHOR multijump.amxx running
[ 43] Advanced Kill Assists 1.2d Xelson kill_assist.amx running
[ 44] Mode 2x2 2.5re s1lent mode.amxx running
[ 45] Christmas Tree Spawn 0.0.1b wopox1337 ChristmasTree.a running
[ 46] Simple Grenade Trail 1.0 seroff granade_trail.a running
[ 47] Block TextMsg 1.0 AcE block_textmsg.a running
47 plugins, 47 running
----------------------------------------------
CRASH: Thu Dec 17 22:58:54 +02 2020
Start Line: ./hlds_linux -game cstrike +ip 46.174.50.104 +port 27015 +map de_dust2 +maxplayers 32 +sys_ticrate 1100 -pingboost 3 -noipx -debug -norestart -pidfile game.pid
[New LWP 29360]
[New LWP 29363]
[New LWP 29366]
[New LWP 29370]
[New LWP 29371]
[New LWP 29372]
[New LWP 29373]
[New LWP 29374]
[New LWP 29407]
[New LWP 29408]
[New LWP 30816]
[New LWP 29364]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `./hlds_linux -game cstrike +ip 46.174.50.104 +port 27015 +map de_dust2 +maxplay'.
Program terminated with signal 11, Segmentation fault.
#0 0xb29b15ad in ?? ()
#0 0xb29b15ad in ?? ()
#1 0xb29b1f0e in ?? ()
#2 0xb6e9db00 in ?? () from /home/server4496/game/engine_i486.so
#3 0xb6dc6438 in SV_Frame() () from /home/server4496/game/engine_i486.so
#4 0x0029ac5f in ?? ()
#5 0x3afbb29c in ?? ()
#6 0x552d4c1c in ?? ()
#7 0x40d500bf in ?? ()
#8 0x552d4c1c in ?? ()
#9 0x40d500bf in ?? ()
#10 0xbf8a4ad0 in ?? ()
#11 0xb6dc5bc5 in Host_Frame () from /home/server4496/game/engine_i486.so
#12 0xb6dc5ab3 in CEngine::Frame() () from /home/server4496/game/engine_i486.so
#13 0xbf8a4a70 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
No symbol table info available.
From To Syms Read Shared Object Library
0xb76d7914 0xb771dc78 Yes ./libstdc++.so.6
0xb7684a90 0xb768597c Yes (*) /lib/libdl.so.2
0xb766d780 0xb7679857 Yes (*) /lib/libpthread.so.0
0xb74bf320 0xb760591b Yes (*) /lib/libc.so.6
0xb746a460 0xb7494c06 Yes (*) /lib/libm.so.6
0xb7452e04 0xb7462490 Yes ./libgcc_s.so.1
0xb77758a0 0xb7790261 Yes (*) /lib/ld-linux.so.2
0xb6d3b530 0xb6e54971 Yes (*) /home/server4496/game/engine_i486.so
0xb6ca4900 0xb6ca7dca Yes (*) /lib/librt.so.1
0xb6c925c0 0xb6c9cd74 Yes (*) ./libsteam_api.so
0xb6c77f40 0xb6c898f8 Yes (*) /home/server4496/game/filesystem_stdio.so
0xb5b18d00 0xb6797780 Yes (*) /home/server4496/.steam/sdk32/steamclient.so
0xb32026a0 0xb3244f70 Yes (*) /home/server4496/game/./cstrike/addons/metamod/metamod_i386.so
0xb2fc1f90 0xb3140ed0 Yes (*) /home/server4496/game/cstrike/dlls/cs.so
0xb2e5b840 0xb2e7f4e0 Yes (*) /home/server4496/game/cstrike/addons/reunion/reunion_mm_i386.so
0xb2e30b40 0xb2e3a0b0 Yes (*) /home/server4496/game/cstrike/addons/reauthcheck/reauthcheck_mm_i386.so
0xb2e13200 0xb2e26120 Yes (*) /home/server4496/game/cstrike/addons/rechecker/rechecker_mm_i386.so
0xb2d7b7b0 0xb2de5bc4 Yes (*) /home/server4496/game/cstrike/addons/VoiceTranscoder/VoiceTranscoder.so
0xb2cc5340 0xb2cd848e Yes (*) /home/server4496/game/cstrike/addons/whblocker/whblocker_mm_i386.so
0xb2c31010 0xb2c9ad59 Yes (*) /home/server4496/game/cstrike/addons/unprecacher/unprecacher_i386.so
0xb2c1db90 0xb2c272f0 Yes (*) /home/server4496/game/cstrike/addons/resemiclip/resemiclip_mm_i386.so
0xb2c04980 0xb2c10d30 Yes (*) /home/server4496/game/cstrike/addons/resrdetector/resrdetector_mm_i386.so
0xb2a2d9f0 0xb2a90d37 Yes (*) /home/server4496/game/cstrike/addons/amxmodx/dlls/amxmodx_mm_i386.so
Yes (*) cstrike/addons/amxmodx/modules/authemu_amxx_i386.so
0xb298a130 0xb2990810 Yes (*) cstrike/addons/amxmodx/modules/reaimdetector_amxx_i386.so
0xb29779c0 0xb297fbb0 Yes (*) cstrike/addons/amxmodx/modules/parachute_amxx_i386.so
0xb2248790 0xb22e0fc5 Yes (*) cstrike/addons/amxmodx/modules/mysql_amxx_i386.so
0xb27b59d0 0xb27e1d6c Yes (*) cstrike/addons/amxmodx/modules/fakemeta_amxx_i386.so
0xb2783290 0xb278f80c Yes (*) cstrike/addons/amxmodx/modules/engine_amxx_i386.so
0xb2720b60 0xb2768624 Yes (*) cstrike/addons/amxmodx/modules/hamsandwich_amxx_i386.so
0xb21c9dc0 0xb220a8f0 Yes (*) cstrike/addons/amxmodx/modules/reapi_amxx_i386.so
0xb2134120 0xb213a404 Yes (*) cstrike/addons/amxmodx/modules/csx_amxx_i386.so
0xb209fd50 0xb20af460 Yes (*) cstrike/addons/amxmodx/modules/cstrike_amxx_i386.so
0xb1e98a50 0xb1e9ffb9 Yes (*) /lib/libnss_files.so.2
0xb1e5bc00 0xb1e5f06e Yes (*) /lib/libnss_dns.so.2
0xb1e436a0 0xb1e52694 Yes (*) /lib/libresolv.so.2
0xabe2b9c0 0xacf3fa44 Yes (*) ./steamclient.so
0xb1d7e670 0xb1df4020 Yes (*) ./crashhandler.so
0xb2940f60 0xb294224c Yes (*) cstrike/addons/amxmodx/modules/sockets_amxx_i386.so
0xb293d160 0xb293e954 Yes (*) cstrike/addons/amxmodx/modules/sockets2_amxx_i386.so
0xb2909720 0xb29121ac Yes (*) cstrike/addons/amxmodx/modules/json_amxx_i386.so
(*): Shared library is missing debugging information.
Stack level 0, frame at 0xbf8a4890:
eip = 0xb29b15ad; saved eip 0xb29b1f0e
called by frame at 0xbf8a48fc
Arglist at 0xbf8a4888, args:
Locals at 0xbf8a4888, Previous frame's sp is 0xbf8a4890
Saved registers:
ebp at 0xbf8a4888, eip at 0xbf8a488c
End of crash report
----------------------------------------------
CRASH: Thu Dec 17 22:58:54 +02 2020
Start Line: ./hlds_linux -game cstrike +ip 46.174.50.104 +port 27015 +map de_dust2 +maxplayers 32 +sys_ticrate 1100 -pingboost 3 -noipx -debug -norestart -pidfile game.pid
[New LWP 29360]
[New LWP 29363]
[New LWP 29366]
[New LWP 29370]
[New LWP 29371]
[New LWP 29372]
[New LWP 29373]
[New LWP 29374]
[New LWP 29407]
[New LWP 29408]
[New LWP 30816]
[New LWP 29364]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `./hlds_linux -game cstrike +ip 46.174.50.104 +port 27015 +map de_dust2 +maxplay'.
Program terminated with signal 11, Segmentation fault.
#0 0xb29b15ad in ?? ()
#0 0xb29b15ad in ?? ()
#1 0xb29b1f0e in ?? ()
#2 0xb6e9db00 in ?? () from /home/server4496/game/engine_i486.so
#3 0xb6dc6438 in SV_Frame() () from /home/server4496/game/engine_i486.so
#4 0x0029ac5f in ?? ()
#5 0x3afbb29c in ?? ()
#6 0x552d4c1c in ?? ()
#7 0x40d500bf in ?? ()
#8 0x552d4c1c in ?? ()
#9 0x40d500bf in ?? ()
#10 0xbf8a4ad0 in ?? ()
#11 0xb6dc5bc5 in Host_Frame () from /home/server4496/game/engine_i486.so
#12 0xb6dc5ab3 in CEngine::Frame() () from /home/server4496/game/engine_i486.so
#13 0xbf8a4a70 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
No symbol table info available.
From To Syms Read Shared Object Library
0xb76d7914 0xb771dc78 Yes ./libstdc++.so.6
0xb7684a90 0xb768597c Yes (*) /lib/libdl.so.2
0xb766d780 0xb7679857 Yes (*) /lib/libpthread.so.0
0xb74bf320 0xb760591b Yes (*) /lib/libc.so.6
0xb746a460 0xb7494c06 Yes (*) /lib/libm.so.6
0xb7452e04 0xb7462490 Yes ./libgcc_s.so.1
0xb77758a0 0xb7790261 Yes (*) /lib/ld-linux.so.2
0xb6d3b530 0xb6e54971 Yes (*) /home/server4496/game/engine_i486.so
0xb6ca4900 0xb6ca7dca Yes (*) /lib/librt.so.1
0xb6c925c0 0xb6c9cd74 Yes (*) ./libsteam_api.so
0xb6c77f40 0xb6c898f8 Yes (*) /home/server4496/game/filesystem_stdio.so
0xb5b18d00 0xb6797780 Yes (*) /home/server4496/.steam/sdk32/steamclient.so
0xb32026a0 0xb3244f70 Yes (*) /home/server4496/game/./cstrike/addons/metamod/metamod_i386.so
0xb2fc1f90 0xb3140ed0 Yes (*) /home/server4496/game/cstrike/dlls/cs.so
0xb2e5b840 0xb2e7f4e0 Yes (*) /home/server4496/game/cstrike/addons/reunion/reunion_mm_i386.so
0xb2e30b40 0xb2e3a0b0 Yes (*) /home/server4496/game/cstrike/addons/reauthcheck/reauthcheck_mm_i386.so
0xb2e13200 0xb2e26120 Yes (*) /home/server4496/game/cstrike/addons/rechecker/rechecker_mm_i386.so
0xb2d7b7b0 0xb2de5bc4 Yes (*) /home/server4496/game/cstrike/addons/VoiceTranscoder/VoiceTranscoder.so
0xb2cc5340 0xb2cd848e Yes (*) /home/server4496/game/cstrike/addons/whblocker/whblocker_mm_i386.so
0xb2c31010 0xb2c9ad59 Yes (*) /home/server4496/game/cstrike/addons/unprecacher/unprecacher_i386.so
0xb2c1db90 0xb2c272f0 Yes (*) /home/server4496/game/cstrike/addons/resemiclip/resemiclip_mm_i386.so
0xb2c04980 0xb2c10d30 Yes (*) /home/server4496/game/cstrike/addons/resrdetector/resrdetector_mm_i386.so
0xb2a2d9f0 0xb2a90d37 Yes (*) /home/server4496/game/cstrike/addons/amxmodx/dlls/amxmodx_mm_i386.so
Yes (*) cstrike/addons/amxmodx/modules/authemu_amxx_i386.so
0xb298a130 0xb2990810 Yes (*) cstrike/addons/amxmodx/modules/reaimdetector_amxx_i386.so
0xb29779c0 0xb297fbb0 Yes (*) cstrike/addons/amxmodx/modules/parachute_amxx_i386.so
0xb2248790 0xb22e0fc5 Yes (*) cstrike/addons/amxmodx/modules/mysql_amxx_i386.so
0xb27b59d0 0xb27e1d6c Yes (*) cstrike/addons/amxmodx/modules/fakemeta_amxx_i386.so
0xb2783290 0xb278f80c Yes (*) cstrike/addons/amxmodx/modules/engine_amxx_i386.so
0xb2720b60 0xb2768624 Yes (*) cstrike/addons/amxmodx/modules/hamsandwich_amxx_i386.so
0xb21c9dc0 0xb220a8f0 Yes (*) cstrike/addons/amxmodx/modules/reapi_amxx_i386.so
0xb2134120 0xb213a404 Yes (*) cstrike/addons/amxmodx/modules/csx_amxx_i386.so
0xb209fd50 0xb20af460 Yes (*) cstrike/addons/amxmodx/modules/cstrike_amxx_i386.so
0xb1e98a50 0xb1e9ffb9 Yes (*) /lib/libnss_files.so.2
0xb1e5bc00 0xb1e5f06e Yes (*) /lib/libnss_dns.so.2
0xb1e436a0 0xb1e52694 Yes (*) /lib/libresolv.so.2
0xabe2b9c0 0xacf3fa44 Yes (*) ./steamclient.so
0xb1d7e670 0xb1df4020 Yes (*) ./crashhandler.so
0xb2940f60 0xb294224c Yes (*) cstrike/addons/amxmodx/modules/sockets_amxx_i386.so
0xb293d160 0xb293e954 Yes (*) cstrike/addons/amxmodx/modules/sockets2_amxx_i386.so
0xb2909720 0xb29121ac Yes (*) cstrike/addons/amxmodx/modules/json_amxx_i386.so
(*): Shared library is missing debugging information.
Stack level 0, frame at 0xbf8a4890:
eip = 0xb29b15ad; saved eip 0xb29b1f0e
called by frame at 0xbf8a48fc
Arglist at 0xbf8a4888, args:
Locals at 0xbf8a4888, Previous frame's sp is 0xbf8a4890
Saved registers:
ebp at 0xbf8a4888, eip at 0xbf8a488c
End of crash report
----------------------------------------------
/*
#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")
}
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
menuId = menu_create(menuTitle,"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
menu_additem(menuId,mItem[ISTRUCT_TITLE],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()
}
- 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")
}
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
menuId = menu_create(menuTitle,"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
menu_additem(menuId,mItem[ISTRUCT_TITLE],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()
}
1 сутки ( 1-2 Краш репорт )
отключите 10 сутки ( нету Краш репорт)