- Ошибка
-
дебаг логи
L 09/26/2018 - 20:28:24: Start of error session.
L 09/26/2018 - 20:28:24: Info (map "de_nuke_2x2") (file "addons/amxmodx/logs/error_20180926.log")
L 09/26/2018 - 20:28:24: replace() buffer not big enough (143>=127)
L 09/26/2018 - 20:28:24: [AMXX] Displaying debug trace (plugin "ad_manager.amxx", version "1.0")
L 09/26/2018 - 20:28:24: [AMXX] Run time error 10: native error (native "replace")
L 09/26/2018 - 20:28:24: [AMXX] [0] 8306d9bf8e091bfd4537072b009fdd53.sma::replace_all_tags (line 188)
L 09/26/2018 - 20:28:24: [AMXX] [1] 8306d9bf8e091bfd4537072b009fdd53.sma::Print_Color_Msg (line 172)
L 09/26/2018 - 20:28:24: [AMXX] [2] 8306d9bf8e091bfd4537072b009fdd53.sma::ShowAutoMSG (line 150)
L 09/26/2018 - 20:28:24: replace() buffer not big enough (133>=127)
L 09/26/2018 - 20:28:24: [AMXX] Displaying debug trace (plugin "ad_manager.amxx", version "1.0")
L 09/26/2018 - 20:28:24: [AMXX] Run time error 10: native error (native "replace")
L 09/26/2018 - 20:28:24: [AMXX] [0] 8306d9bf8e091bfd4537072b009fdd53.sma::replace_all_tags (line 188)
L 09/26/2018 - 20:28:24: [AMXX] [1] 8306d9bf8e091bfd4537072b009fdd53.sma::Print_Color_Msg (line 172)
L 09/26/2018 - 20:28:24: [AMXX] [2] 8306d9bf8e091bfd4537072b009fdd53.sma::ShowAutoMSG (line 150)
L 09/26/2018 - 20:28:24: replace() buffer not big enough (150>=127)
L 09/26/2018 - 20:28:24: [AMXX] Displaying debug trace (plugin "ad_manager.amxx", version "1.0")
L 09/26/2018 - 20:28:24: [AMXX] Run time error 10: native error (native "replace")
L 09/26/2018 - 20:28:24: [AMXX] [0] 8306d9bf8e091bfd4537072b009fdd53.sma::replace_all_tags (line 188)
L 09/26/2018 - 20:28:24: [AMXX] [1] 8306d9bf8e091bfd4537072b009fdd53.sma::Print_Color_Msg (line 172)
L 09/26/2018 - 20:28:24: [AMXX] [2] 8306d9bf8e091bfd4537072b009fdd53.sma::ShowAutoMSG (line 150)
L 09/26/2018 - 20:28:24: replace() buffer not big enough (135>=127)
L 09/26/2018 - 20:28:24: [AMXX] Displaying debug trace (plugin "ad_manager.amxx", version "1.0")
L 09/26/2018 - 20:28:24: [AMXX] Run time error 10: native error (native "replace")
L 09/26/2018 - 20:28:24: [AMXX] [0] 8306d9bf8e091bfd4537072b009fdd53.sma::replace_all_tags (line 188)
L 09/26/2018 - 20:28:24: [AMXX] [1] 8306d9bf8e091bfd4537072b009fdd53.sma::Print_Color_Msg (line 172)
L 09/26/2018 - 20:28:24: [AMXX] [2] 8306d9bf8e091bfd4537072b009fdd53.sma::ShowAutoMSG (line 150)
- ОС
- Linux
- Amx Mod X
-
amxx version
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
- Билд
-
version
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.4.0.664-dev
Build date: 10:46:45 Sep 19 2018 (1621)
Build from: https://github.com/dreamstalker/rehlds/commit/83f53fb
- ReGamedll
-
game version
ReGameDLL version: 5.7.0.312-dev
Build date: 07:53:34 May 31 2018
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/26db32e
- Версия 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
- Список метамодулей
-
meta list
Список загруженых плагинов:
description stat pend file vers src load unload
[ 1] Reunion RUN - reunion_mm_i386.so v0.1.0.92 ini Start Never
[ 2] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5221 ini Start ANY
[ 3] VoiceTranscoder RUN - VoiceTranscoder.so v2017RC3 ini ANY ANY
[ 4] Rechecker RUN - rechecker_mm_i386.so v2.5 ini Chlvl ANY
[ 5] ReSemiclip RUN - resemiclip_mm_i386.so v2.3.9 ini Chlvl ANY
[ 6] MySQL RUN - mysql_amxx_i386.so v1.9.0.5221 pl2 ANY ANY
[ 7] SQLite RUN - sqlite_amxx_i386.so v1.9.0.5221 pl2 ANY ANY
[ 8] Fun RUN - fun_amxx_i386.so v1.9.0.5221 pl2 ANY ANY
[ 9] Engine RUN - engine_amxx_i386.so v1.9.0.5221 pl2 ANY ANY
[10] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5221 pl2 ANY ANY
[11] GeoIP RUN - geoip_amxx_i386.so v1.9.0.5221 pl2 ANY ANY
[12] CStrike RUN - cstrike_amxx_i386.so v1.8.3-Re pl2 ANY ANY
[13] CSX RUN - csx_amxx_i386.so v1.8.3-Re pl2 ANY ANY
[14] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5221 pl2 ANY ANY
[15] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl2 ANY Never
[16] ReAPI RUN - reapi_amxx_i386.so v5.6.0.157-dev pl2 ANY Never
[17] VTC AMXX API RUN - VtcApi_amxx_i386.so v2017 RC pl2 ANY ANY
[18] hackdetector RUN - hackdetector_amxx_i386.so v0.15.328.lite pl2 ANY ANY
[19] C4 Control RUN - c4_control_amxx_i386.so v1.0.2 pl2 ANY ANY
19 plugins, 19 работает
- Список плагинов
-
amx_plugins
Список загруженых плагинов:
name version author file status
[ 1] Admin Loader 3.5 neygomon admin_loader_3. работает
[ 2] FreshBans 1.4.0b kanagava fresh_bans_140. работает
[ 3] fb_forwards 0.1.4 Kanagava & Realu fb_forwards.amx работает
[ 4] Admin Commands 1.9.0.5221 AMXX Dev Team admincmd.amxx работает
[ 5] Admin Help 1.9.0.5221 AMXX Dev Team adminhelp.amxx работает
[ 6] Slots Reservation 1.9.0.5221 AMXX Dev Team adminslots.amxx работает
[ 7] Multi-Lingual System 1.9.0.5221 AMXX Dev Team multilingual.am работает
[ 8] Menus Front-End 1.9.0.5221 AMXX Dev Team menufront.amxx работает
[ 9] Commands Menu 1.9.0.5221 AMXX Dev Team cmdmenu.amxx работает
[ 10] New Kick Menu 1.4.2 Radius newkickmenu.amx работает
[ 11] Players Menu 1.9.0.5221 AMXX Dev Team plmenu.amxx работает
[ 12] Teleport Menu 1.9.0.5221 AMXX Dev Team telemenu.amxx работает
[ 13] Maps Menu 1.9.0.5221 AMXX Dev Team mapsmenu.amxx работает
[ 14] Lite MapChooser 2.6 neygomon lite_mapchooser работает
[ 15] Plugin Menu 1.9.0.5221 AMXX Dev Team pluginmenu.amxx работает
[ 16] Anti Flood 1.9.0.5221 AMXX Dev Team antiflood.amxx работает
[ 17] Admin Chat 1.9.0.5221 AMXX Dev Team adminchat.amxx работает
[ 18] Scrolling Message 1.9.0.5221 AMXX Dev Team scrollmsg.amxx работает
[ 19] Info. Messages 1.9.0.5221 AMXX Dev Team imessage.amxx работает
[ 20] Admin Votes 1.9.0.5221 AMXX Dev Team adminvote.amxx работает
[ 21] Pause Plugins 1.9.0.5221 AMXX Dev Team pausecfg.amxx работает
[ 22] Stats Configuration 1.9.0.5221 AMXX Dev Team statscfg.amxx работает
[ 23] CSX Easy Stats 1.5 neugomon csx_easy_stats. работает
[ 24] Parachute 15.01.06 KRoT@L/JTP10181 parachute_rbs.a работает
[ 25] [ReAPI] AWPoff 1.4.3 PAffAEJIkA :3 awp_off.amxx работает
[ 26] Example AWPoff API 1.0 PAffAEJIkA :3 example_t.amxx работает
[ 27] [ReAPI] Random Weapons 2.4.6 neugomon random_weapons_ работает
[ 28] Items Restrict 1.0 s1lent items_restrict. работает
[ 29] High Ping Kicker 1.0 Shadow/Bo0m! hpk.amxx работает
[ 30] AFK Control 1.4.1 [Rnd neygomon afk_control.amx работает
[ 31] Join/Leave Message 1.2 BigBaller join_leave.amxx работает
[ 32] ReAPI Test 1.0 s1lent reapi_test.amxx работает
[ 33] Auto recording demo 2.0 IzI | Bonaqua (R amx_autodemorec работает
[ 34] Night Mode 1.2.3 Radius night_mode.amxx работает
[ 35] No Players Map 1.03 neygomon no_players_map. остановлен
[ 36] [ReAPI] No Team Flash 0.0.2 Vaqtincha no_team_flash.a работает
[ 37] Damager Advanced 1.1.2 Radius (based on damager_advance работает
[ 38] Admin Spectator ESP 1.3 KoST admin_esp.amxx работает
[ 39] AD Manager 1.0 Nesquik ad_manager.amxx debug
[ 40] Weapon Restrict 1.7 s1lent weapon_rest.amx работает
[ 41] Weapon Menu 0.1 Subb98 weaponmenu_cl.a работает
[ 42] Gag Me 2.3.4 Radius gag_me.amxx работает
[ 43] C4 Control 1.3.2 Radius c4_control.amxx работает
[ 44] Killer ScreenFade 0.0.5 Vaqtincha reapi_killer_sc работает
[ 45] GameName Changer 1.0 neugomon gamename_change работает
[ 46] Name Users 1.0 Seroff name.amxx работает
[ 47] Knife Duel with Telepo 1.2 neygomon knife_duel.amxx работает
[ 48] Block grande info 1.0 neygomon BlockGrenadeInf работает
[ 49] HackDetector 0.15.lite Lev @ AGHL.RU De hackdetector.am работает
[ 50] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a работает
[ 51] Lite Translit Beta 21 neygomon lite_translit_1 работает
[ 52] Mode 2x2 2.5re s1lent mode.amxx работает
[ 53] Auto Team Balance Adva 1.5.1 Radius auto_team_balan работает
[ 54] [ReAPI] VIP System 1.3.1 pUzzlik re_vip_system.a работает
[ 55] unknown unknown unknown adminfreelook.a работает
[ 56] Admin Player Name 1.5 Sutar admin_player_na работает
[ 57] ReChecker Logging 1.0 custom rc_logging.amxx работает
[ 58] Admin/Vip Connect 1.0 Eazy* connect_privile работает
[ 59] Say Vip&Admin 0.1 pUzzlik say_privileges. работает
[ 60] Steam Bonus 1.1 ill+F@nToM steam_bonus_a2. работает
[ 61] AMXBans: Freeze Gm 1.6 Larte Team amxbans_freeze. работает
[ 62] AMXBans: Flagged Gm 1.6 Larte Team amxbans_flagged работает
62 plugins, 61 работает
- Автор плагина
- Nesquik
- Версия плагина
- 1.0
- Исходный код
-
#include <amxmodx>
#include <amxmisc>
#define TASK_ID 515123
enum _: msg_cmd_enum
{
cmd_com[32],
cmd_msg[192]
}
new Array:MessageCMD, Array:MessageAuto;
new message_cmd_load, msg_cmd[msg_cmd_enum], message_auto_load;
new cur_auto_msg_id, cur_auto_msg[192];
new pcvar_auto_type, pcvar_auto_random;
public plugin_init( )
{
register_plugin("AD Manager", "1.0", "Nesquik");
pcvar_auto_type = register_cvar("ad_manager_auto_type", "0"); // 0 - показывать всем, 1 - показывать только мертвым, 2 - показывать только живым
pcvar_auto_random = register_cvar("ad_manager_auto_random", "0"); // 0 - сообщения идут по порядку, 1 - сообщения выбираются случайным образом
}
public plugin_cfg( )
{
new filename[96];
get_configsdir(filename, charsmax(filename));
add(filename, charsmax(filename), "/ad_manager.ini");
if (!file_exists(filename)) set_fail_state("ad_manager file not found");
MessageCMD = ArrayCreate(msg_cmd_enum);
MessageAuto = ArrayCreate(192, 1);
new text[256];
new hostname[64], contact[64], maxplayers[32], mapname[32], server_ip[25];
new file = fopen(filename, "rt");
if (!file) set_fail_state("ad_manager open error!");
get_cvar_string("hostname", hostname, charsmax(hostname));
get_mapname(mapname, charsmax(mapname));
formatex(maxplayers, charsmax(maxplayers), "%d", get_maxplayers());
get_user_ip(0, server_ip, charsmax(server_ip));
if (cvar_exists("sv_contact")) get_cvar_string("sv_contact", contact, charsmax(contact));
while(!feof(file))
{
fgets(file, text, charsmax(text));
trim(text);
if (text[0] == ';' || !text[0]) continue;
if (text[0] == '@')
{
strtok(text[1], msg_cmd[cmd_com], charsmax(msg_cmd[cmd_com]), msg_cmd[cmd_msg], charsmax(msg_cmd[cmd_msg]), ' ');
trim(msg_cmd[cmd_com]);
trim(msg_cmd[cmd_msg]);
strtolower(msg_cmd[cmd_com]);
format(msg_cmd[cmd_msg], charsmax(msg_cmd[cmd_msg]), "^1%s", msg_cmd[cmd_msg]);
while(replace(msg_cmd[cmd_msg], charsmax(msg_cmd[cmd_msg]), "!g", "^4")){}
while(replace(msg_cmd[cmd_msg], charsmax(msg_cmd[cmd_msg]), "!t", "^3")){}
while(replace(msg_cmd[cmd_msg], charsmax(msg_cmd[cmd_msg]), "!n", "^1")){}
if (containi(msg_cmd[cmd_msg], "#hostname#") != -1) while(replace(msg_cmd[cmd_msg], charsmax(msg_cmd[cmd_msg]), "#hostname#", hostname)){}
if (containi(msg_cmd[cmd_msg], "#maxplayers#") != -1) while(replace(msg_cmd[cmd_msg], charsmax(msg_cmd[cmd_msg]), "#maxplayers#", maxplayers)){}
if (containi(msg_cmd[cmd_msg], "#server_ip#") != -1) while(replace(msg_cmd[cmd_msg], charsmax(msg_cmd[cmd_msg]), "#server_ip#", server_ip)){}
if (containi(msg_cmd[cmd_msg], "#mapname#") != -1) while(replace(msg_cmd[cmd_msg], charsmax(msg_cmd[cmd_msg]), "#mapname#", mapname)){}
if (containi(msg_cmd[cmd_msg], "#contact#") != -1) while(replace(msg_cmd[cmd_msg], charsmax(msg_cmd[cmd_msg]), "#contact#", contact)){}
ArrayPushArray(MessageCMD, msg_cmd);
}
else
{
format(text, charsmax(text), "^1%s", text);
while(replace(text, charsmax(text), "!g", "^4")){}
while(replace(text, charsmax(text), "!t", "^3")){}
while(replace(text, charsmax(text), "!n", "^1")){}
if (containi(text, "#hostname#") != -1) while(replace(text, charsmax(text), "#hostname#", hostname)){}
if (containi(text, "#maxplayers#") != -1) while(replace(text, charsmax(text), "#maxplayers#", maxplayers)){}
if (containi(text, "#server_ip#") != -1) while(replace(text, charsmax(text), "#server_ip#", server_ip)){}
if (containi(text, "#mapname#") != -1) while(replace(text, charsmax(text), "#mapname#", mapname)){}
if (containi(text, "#contact#") != -1) while(replace(text, charsmax(text), "#contact#", contact)){}
if (strlen(text) > 191) text[191] = '^0';
ArrayPushString(MessageAuto, text);
}
}
if ((message_cmd_load = ArraySize(MessageCMD)) > 0)
{
register_clcmd("say", "fwd_hook_say");
register_clcmd("say_team", "fwd_hook_say");
}
if ((message_auto_load = ArraySize(MessageAuto)) > 0)
{
cur_auto_msg_id = -1;
set_task(random_float(25.0, 45.0), "ShowAutoAD", TASK_ID, .flags = "b");
}
fclose(file);
}
public ShowAutoAD( )
{
static players[32],
count, player, i;
switch(get_pcvar_num(pcvar_auto_type))
{
case 1: get_players(players, count, "bch");
case 2: get_players(players, count, "ach");
default: get_players(players, count, "ch");
}
if (!count) return;
if (get_pcvar_num(pcvar_auto_random)) cur_auto_msg_id = random_num(0, message_auto_load - 1);
else
{
cur_auto_msg_id++;
if (cur_auto_msg_id >= message_auto_load || cur_auto_msg_id < 0) cur_auto_msg_id = 0;
}
ArrayGetString(MessageAuto, cur_auto_msg_id, cur_auto_msg, charsmax(cur_auto_msg));
for( i = 0; i < count; i++ )
{
player = players[i];
switch(player)
{
case 1..8: set_task(0.1, "ShowAutoMSG", player);
case 9..16: set_task(0.2, "ShowAutoMSG", player);
case 17..24: set_task(0.3, "ShowAutoMSG", player);
case 25..32: set_task(0.4, "ShowAutoMSG", player);
}
}
}
public ShowAutoMSG(player) Print_Color_Msg(player, cur_auto_msg);
public fwd_hook_say(id)
{
new msg[192];
read_args(msg, charsmax(msg));
remove_quotes(msg);
trim(msg);
for( new i = 0; i < message_cmd_load; i++ )
{
ArrayGetArray(MessageCMD, i, msg_cmd);
if (equal(msg, msg_cmd[cmd_com])) Print_Color_Msg(id, msg_cmd[cmd_msg]);
}
}
public Print_Color_Msg(id, msg[])
{
static cur_msg[192];
format(cur_msg, charsmax(cur_msg), msg);
replace_all_tags(id, cur_msg);
message_begin(MSG_ONE_UNRELIABLE, 76, .player = id);
write_byte(id);
write_string(cur_msg);
message_end();
}
public replace_all_tags(id, msg[])
{
static len, time; len = strlen(msg);
static string[32];
if (containi(msg, "#name#") != -1)
{
get_user_name(id, string, charsmax(string));
while(replace(msg, len, "#name#", string)){}
}
if (containi(msg, "#numplayers#") != -1)
{
format(string, charsmax(string), "%d", get_playersnum());
while(replace(msg, len, "#numplayers#", string)){}
}
if (containi(msg, "#timeleft#") != -1)
{
time = get_timeleft( );
format(string, charsmax(string), "%d:%02d", time / 60, time % 60);
while(replace(msg, len, "#timeleft#", string)){}
}
}
вот как то так