Перенос сервера на VDS прошел не очень гладко)

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
12
Реакции
0
Ошибка
L 06/19/2020 - 10:45:42: Couldn't write file "cstrike/addons/amxmodx/logs/reaimdetector/2020.06.19.log"
L 06/19/2020 - 10:45:42: [AMXX] Displaying debug trace (plugin "reaimdetector.amxx", version "0.2.2")
L 06/19/2020 - 10:45:42: [AMXX] Run time error 10: native error (native "write_file")
L 06/19/2020 - 10:45:42: [AMXX] [0] reaimdetector.sma::SaveLogFile (line 745)
L 06/19/2020 - 10:45:42: [AMXX] [1] reaimdetector.sma::ad_init (line 441)
И вот еще в мета листе
[ 4] <processcmds_mm badf load processcmds_mm_i v - ini - -
ОС
Linux
Amx Mod X
AMX Mod X 1.9.0.5263
Билд
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.6.0.672-dev
Build date: 17:31:06 Jun 5 2019 (1880)
ReGamedll
ReGameDLL version: 5.17.0.466-dev
Build date: 02:56:24 May 27 2020
Версия Metamod
Metamod v1.21p37
Список метамодулей
[ 1] Reunion          RUN   -    reunion_mm_i386.  v0.1.75   ini   Start Never
[ 2] SafeNameAndChat RUN - SafeNameAndChat. v1.1 ini ANY ANY
[ 3] AMX Mod X RUN - amxmodx_mm_i386. v1.9.0.5 ini Start ANY
[ 4] <processcmds_mm badf load processcmds_mm_i v - ini - -
[ 5] ReSemiclip RUN - resemiclip_mm_i3 v2.3.9 ini Chlvl ANY
[ 6] Revoice RUN - revoice_mm_i386. v0.1.0.3 ini Start Never
[ 7] WHBlocker RUN - whblocker_mm_i38 v1.5.697 ini Chlvl ANY
[ 8] MySQL RUN - mysql_amxx_i386. v1.9.0.5 pl3 ANY ANY
[ 9] Fun RUN - fun_amxx_i386.so v1.9.0.5 pl3 ANY ANY
[10] FakeMeta RUN - fakemeta_amxx_i3 v1.9.0.5 pl3 ANY ANY
[11] Ham Sandwich RUN - hamsandwich_amxx v1.9.0.5 pl3 ANY ANY
[12] ReAimDetector RUN - reaimdetector_am v0.2.2 pl3 ANY Never
[13] CStrike RUN - cstrike_amxx_i38 v1.9.0.5 pl3 ANY ANY
[14] ReAPI RUN - reapi_amxx_i386. v5.14.0. pl3 ANY Never
[15] Engine RUN - engine_amxx_i386 v1.9.0.5 pl3 ANY ANY
15 plugins, 14 running
Список плагинов
[  1] FreshBans               1.3.8b      kanagava          fresh_bans.amxx  running  
[ 2] Admin Loader 2.9 neygomon admin_loader.am running
[ 3] Admin Commands 1.9.0.5263 AMXX Dev Team admincmd.amxx running
[ 4] Admin Votes 1.9.0.5263 AMXX Dev Team adminvote.amxx running
[ 5] Commands Menu 1.9.0.5263 AMXX Dev Team cmdmenu.amxx running
[ 6] Info. Messages 1.9.0.5263 AMXX Dev Team imessage.amxx running
[ 7] Maps Menu 1.9.0.5263 AMXX Dev Team mapsmenu.amxx running
[ 8] Menus Front-End 1.9.0.5263 AMXX Dev Team menufront.amxx running
[ 9] CS Misc. Stats 1.9.0.5263 AMXX Dev Team miscstats.amxx running
[ 10] Multi-Lingual System 1.9.0.5263 AMXX Dev Team multilingual.am running
[ 11] Pause Plugins 1.9.0.5263 AMXX Dev Team pausecfg.amxx running
[ 12] Players Menu 1.9.0.5263 AMXX Dev Team plmenu.amxx running
[ 13] Restrict Weapons 1.9.0.5263 AMXX Dev Team restmenu.amxx running
[ 14] Scrolling Message 1.9.0.5263 AMXX Dev Team scrollmsg.amxx running
[ 15] AES: StatsX 0.5+1 serfreeman1337 aes_statsx_cstr running
[ 16] CSStatsX SQL 0.7.4+2 serfreeman1337 csstatsx_sql.am running
[ 17] CS Stats Logging 1.9.0.5263 AMXX Dev Team stats_logging.a running
[ 18] Stats Configuration 1.9.0.5263 AMXX Dev Team statscfg.amxx running
[ 19] StatsX 1.9.0.5263 AMXX Dev Team statsx.amxx running
[ 20] Teleport Menu 1.9.0.5263 AMXX Dev Team telemenu.amxx running
[ 21] TimeLeft 1.9.0.5263 AMXX Dev Team timeleft.amxx running
[ 22] Plugin Menu 1.9.0.5263 AMXX Dev Team pluginmenu.amxx running
[ 23] Admin ESP 1.5b_mini KoST admin_esp_mini. running
[ 24] High Ping Kicker 1.0 Shadow/Bo0m! amx_hpk.amxx running
[ 25] Admin Free Look 2.0 Jim admin_freelook. running
[ 26] Play or Be Kicked 1.5.243 Brad Jones pbk.amxx running
[ 27] UFPS VoteBan 1.5 UFPS.Team voteban.amxx running
[ 28] mute menu 1.0 cheap_suit mutemenu.amxx running
[ 29] Info Rank 1.0/1 connor info_rank.amxx running
[ 30] Block HudTextArgs 1.0 ConnorMcLeod hudTextArgsBloc running
[ 31] Damager 0.0.5 steelzzz damager.amxx paused
[ 32] V.I.P Custom Weapons 1.0.0 Vaqtincha vip_custom.amxx running
[ 33] V.I.P Custom AK-47 1.0.0 Vaqtincha custom_ak47.amx running
[ 34] V.I.P Custom AWP 1.0.0 Vaqtincha custom_awp.amxx running
[ 35] V.I.P Custom DEAGLE 1.0.0 Vaqtincha custom_deagle.a running
[ 36] V.I.P Custom KNIFE 1.0.0 Vaqtincha custom_knife.am running
[ 37] V.I.P Custom M4A1 1.0.0 Vaqtincha custom_m4a1.amx running
[ 38] Block Pickup Gold 0.1 Vaqtincha BlockPickupGold running
[ 39] Reset Score 1.0 Silenttt resetscore.amxx running
[ 40] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a debug
[ 41] GameName Changer 1.0 neugomon gamename.amxx running
[ 42] Rank1 -> VIP 0.0.1 ConnorMcLeod vip_rank.amxx running
[ 43] [182] Parachute RBS 17.12.12 KRoT@L/JTP10181 parachute_rbs.a running
[ 44] VIPKA 0.1 VATAJAT vipka.amxx running
[ 45] Menu 1.0 WaT_1 menu.amxx running
[ 46] Lite Night Mode 1.0 neugomon ? night_vip.amxx running
[ 47] Killer ScreenFade 0.0.5 Vaqtincha reapi_killer_sc running
[ 48] [ReAPI] Custom Models 1.6.1 neugomon custom_models.a running
[ 49] Paint Marker 2.0.0 twisterniq paint_marker.am running
[ 50] Paint Marker: Default 1.0.1 twisterniq paint_marker_de running
[ 51] Game Messages & Sounds 3.0 OciXCrom crx_gamemessage running
[ 52] Style C4 Timer 3.1 OciXCrom crx_c4timer.amx running
[ 53] [ReAPI] Healthnade 0.0.2 F@nt0M reapi_healthnad running
[ 54] Reklama 20.05.2020 mx?! reklama.amxx running
[ 55] Lite Translit 2.8 neygomon lite_translit.a running
[ 56] Top Awards 0.2cx Safety1st top_awards.amxx running
[ 57] Advanced Experience Sy 0.5.9 [REA serfreeman1337/s aes_main.amxx running
[ 58] AES: CStrike Addon 0.5.9 [REA serfreeman1337/s aes_exp_cstrike running
[ 59] AES: Informer 0.5 Vega serfreeman1337 aes_informer.am debug
[ 60] AES: Admin Tools 0.5.9 [REA serfreeman1337/s aes_exp_editor. running
[ 61] AES: Bonus System 0.5.9 Vega serfreeman1337/s aes_bonus_syste running
[ 62] AES: Bonus CSTRIKE 0.5.9.1 [R serfreeman1337/s aes_bonus_cstri running
[ 63] AES Bonus: Flags 0.2 Sonyx aes_bonus_flags running
[ 64] Map Manager: Core 3.0.7 Mistrick map_manager_cor running
[ 65] Map Manager: Scheduler 0.1.5 Mistrick map_manager_sch running
[ 66] Map Manager: Rtv 0.1.1 Mistrick map_manager_rtv running
[ 67] Map Manager: Nominatio 0.1.2 Mistrick map_manager_nom running
[ 68] Map Manager: Effects 0.0.9 Mistrick map_manager_eff running
[ 69] Map Manager: Informer 0.0.5 Mistrick map_manager_inf running
Автор плагина
ReHLDS Team
Версия плагина
Не знаю
Исходный код
#include <amxmodx>
#include <reaimdetector>

#pragma semicolon 1

#if !defined MAX_PLAYERS
#define MAX_PLAYERS 32
#endif

#if defined client_disconnected
#define player_disconnect client_disconnected
#else
#define player_disconnect client_disconnect
#endif

#define ENABLE_LOG_FILE // Включить логирование
#define RELOAD_CMD ADMIN_CFG // Флаг доступа к команде перезагрузки конфига: reaim_reloadcfg
#define MENU_CMD ADMIN_BAN // Флаг доступа к Aim меню: say /aim

enum CfgType
{
AIM = 1,
SPREAD,
PUNISH,
SAVE,
OTHER
}

#if (AMXX_VERSION_NUM < 183)

enum
{
print_team_default = 0,
print_team_grey = -1,
print_team_red = -2,
print_team_blue = -3
};

#define replace_string replace_all

#endif

new Trie:g_tAimBotSteamWarns, Trie:g_tAimBotIpWarns;
new Trie:g_tNoSpreadSteamWarns, Trie:g_tNoSpreadIpWarns;

new g_iAimDetection, g_iAimSens, g_iAimMultiWarn, g_iAimNotify, g_iAimMaxWarns, g_iAimShotsReset, g_iAimKillsReset, g_iAimTimeReset;
new g_iSaveType, g_iAimSaveWarns, g_iSpreadSaveWarns;
new g_iSpreadDetection, g_iSpreadNotify, g_iSpreadMaxWarns;
new g_iAlertFlag;
new g_iSendProtectionWeapon;
new g_iCrashCheat;
new g_iBanTime[PunishType];
new g_szBanReason[PunishType][64];
new g_szBanString[PunishType][128];

#if defined ENABLE_LOG_FILE
new g_FilePath[64], g_LogDir[128];
#endif

public plugin_init()
{
register_plugin("ReAimDetector API", REAIMDETECTOR_VERSION, "ReHLDS Team");

register_concmd("reaim_reloadcfg", "ReloadCfg", RELOAD_CMD);

register_clcmd("say /aim", "AimMenu", MENU_CMD);
register_clcmd("say_team /aim", "AimMenu", MENU_CMD);

g_tAimBotSteamWarns = TrieCreate();
g_tAimBotIpWarns = TrieCreate();
g_tNoSpreadSteamWarns = TrieCreate();
g_tNoSpreadIpWarns = TrieCreate();
}

public plugin_end()
{

#if defined ENABLE_LOG_FILE
new Map[32], BufLog[64];
get_mapname(Map, charsmax(Map));
formatex(BufLog, charsmax(BufLog), "End Map [%s]", Map);
SaveLogFile(BufLog);
#endif

TrieClear(g_tAimBotSteamWarns);
TrieClear(g_tAimBotIpWarns);
TrieClear(g_tNoSpreadSteamWarns);
TrieClear(g_tNoSpreadIpWarns);
}

public client_putinserver(id)
{
switch(g_iSaveType)
{
case 1:
{
new szSteam[33], iWarns;
get_user_authid(id, szSteam, charsmax(szSteam));

#if defined ENABLE_LOG_FILE
new szBufLog[190], szAddress[17], szName[32];
get_user_ip(id, szAddress, charsmax(szAddress), 1);
get_user_name(id, szName, charsmax(szName));
#endif

if(TrieKeyExists(g_tAimBotSteamWarns, szSteam))
{
TrieGetCell(g_tAimBotSteamWarns, szSteam, iWarns);
TrieDeleteKey(g_tAimBotSteamWarns, szSteam);

ad_set_client(id, AimWarn, iWarns);

#if defined ENABLE_LOG_FILE
formatex(szBufLog, charsmax(szBufLog), "Aim Warn Recovered (Steam): ID [%d] Name [%s] Steam [%s] IP [%s] Warn [%d]", id, szName, szSteam, szAddress, iWarns);
SaveLogFile(szBufLog);
#endif

}

if(TrieKeyExists(g_tNoSpreadSteamWarns, szSteam))
{
TrieGetCell(g_tNoSpreadSteamWarns, szSteam, iWarns);
TrieDeleteKey(g_tNoSpreadSteamWarns, szSteam);

ad_set_client(id, NoSpreadWarn, iWarns);

#if defined ENABLE_LOG_FILE
formatex(szBufLog, charsmax(szBufLog), "NoSpread Warn Recovered (Steam): ID [%d] Name [%s] Steam [%s] IP [%s] Warn [%d]", id, szName, szSteam, szAddress, iWarns);
SaveLogFile(szBufLog);
#endif

}
}
case 2:
{
new szAddress[17], iWarns;
get_user_ip(id, szAddress, charsmax(szAddress), 1);

#if defined ENABLE_LOG_FILE
new szBufLog[190], szSteam[33], szName[32];
get_user_authid(id, szSteam, charsmax(szSteam));
get_user_name(id, szName, charsmax(szName));
#endif

if(TrieKeyExists(g_tAimBotIpWarns, szAddress))
{
TrieGetCell(g_tAimBotIpWarns, szAddress, iWarns);
TrieDeleteKey(g_tAimBotIpWarns, szAddress);

ad_set_client(id, AimWarn, iWarns);

#if defined ENABLE_LOG_FILE
formatex(szBufLog, charsmax(szBufLog), "Aim Warn Recovered (IP): ID [%d] Name [%s] Steam [%s] IP [%s] Warn [%d]", id, szName, szSteam, szAddress, iWarns);
SaveLogFile(szBufLog);
#endif

}

if(TrieKeyExists(g_tNoSpreadIpWarns, szAddress))
{
TrieGetCell(g_tNoSpreadIpWarns, szAddress, iWarns);
TrieDeleteKey(g_tNoSpreadIpWarns, szAddress);

ad_set_client(id, NoSpreadWarn, iWarns);

#if defined ENABLE_LOG_FILE
formatex(szBufLog, charsmax(szBufLog), "NoSpread Warn Recovered (IP): ID [%d] Name [%s] Steam [%s] IP [%s] Warn [%d]", id, szName, szSteam, szAddress, iWarns);
SaveLogFile(szBufLog);
#endif

}
}
case 3:
{
new szSteam[33], szAddress[17], iWarns;
get_user_authid(id, szSteam, charsmax(szSteam));
get_user_ip(id, szAddress, charsmax(szAddress), 1);

#if defined ENABLE_LOG_FILE
new szBufLog[190], szName[32];
get_user_name(id, szName, charsmax(szName));
#endif

new bool:IsExistsAim = false;
new bool:IsExistsSpread = false;

if(TrieKeyExists(g_tAimBotSteamWarns, szSteam))
{
IsExistsAim = true;

TrieGetCell(g_tAimBotSteamWarns, szSteam, iWarns);
TrieDeleteKey(g_tAimBotSteamWarns, szSteam);

ad_set_client(id, AimWarn, iWarns);

#if defined ENABLE_LOG_FILE
formatex(szBufLog, charsmax(szBufLog), "Aim Warn Recovered (Steam): ID [%d] Name [%s] Steam [%s] IP [%s] Warn [%d]", id, szName, szSteam, szAddress, iWarns);
SaveLogFile(szBufLog);
#endif

}

if(TrieKeyExists(g_tAimBotIpWarns, szAddress))
{
if(IsExistsAim)
{
TrieDeleteKey(g_tAimBotIpWarns, szAddress);
}
else
{
TrieGetCell(g_tAimBotIpWarns, szAddress, iWarns);
TrieDeleteKey(g_tAimBotIpWarns, szAddress);

ad_set_client(id, AimWarn, iWarns);

#if defined ENABLE_LOG_FILE
formatex(szBufLog, charsmax(szBufLog), "Aim Warn Recovered (IP): ID [%d] Name [%s] Steam [%s] IP [%s] Warn [%d]", id, szName, szSteam, szAddress, iWarns);
SaveLogFile(szBufLog);
#endif

}
}

if(TrieKeyExists(g_tNoSpreadSteamWarns, szSteam))
{
IsExistsSpread = true;

TrieGetCell(g_tNoSpreadSteamWarns, szSteam, iWarns);
TrieDeleteKey(g_tNoSpreadSteamWarns, szSteam);

ad_set_client(id, NoSpreadWarn, iWarns);

#if defined ENABLE_LOG_FILE
formatex(szBufLog, charsmax(szBufLog), "NoSpread Warn Recovered (Steam): ID [%d] Name [%s] Steam [%s] IP [%s] Warn [%d]", id, szName, szSteam, szAddress, iWarns);
SaveLogFile(szBufLog);
#endif

}

if(TrieKeyExists(g_tNoSpreadIpWarns, szAddress))
{
if(IsExistsSpread)
{
TrieDeleteKey(g_tNoSpreadIpWarns, szAddress);
}
else
{
TrieGetCell(g_tNoSpreadIpWarns, szAddress, iWarns);
TrieDeleteKey(g_tNoSpreadIpWarns, szAddress);

ad_set_client(id, NoSpreadWarn, iWarns);

#if defined ENABLE_LOG_FILE
formatex(szBufLog, charsmax(szBufLog), "NoSpread Warn Recovered (IP): ID [%d] Name [%s] Steam [%s] IP [%s] Warn [%d]", id, szName, szSteam, szAddress, iWarns);
SaveLogFile(szBufLog);
#endif

}
}
}
}
}

public player_disconnect(id)
{
switch(g_iSaveType)
{
case 1:
{
new szSteam[33];
get_user_authid(id, szSteam, charsmax(szSteam));

new iAimBotWarns = ad_get_client(id, AimWarn);
new iNoSpreadWarns = ad_get_client(id, NoSpreadWarn);

if(iAimBotWarns >= g_iAimSaveWarns)
{
TrieSetCell(g_tAimBotSteamWarns, szSteam, iAimBotWarns);
}

if(iNoSpreadWarns >= g_iSpreadSaveWarns)
{
TrieSetCell(g_tNoSpreadSteamWarns, szSteam, iNoSpreadWarns);
}
}
case 2:
{
new szAddress[17];
get_user_ip(id, szAddress, charsmax(szAddress), 1);

new iAimBotWarns = ad_get_client(id, AimWarn);
new iNoSpreadWarns = ad_get_client(id, NoSpreadWarn);

if(iAimBotWarns >= g_iAimSaveWarns)
{
TrieSetCell(g_tAimBotIpWarns, szAddress, iAimBotWarns);
}

if(iNoSpreadWarns >= g_iSpreadSaveWarns)
{
TrieSetCell(g_tNoSpreadIpWarns, szAddress, iNoSpreadWarns);
}
}
case 3:
{
new szSteam[33], szAddress[17];
get_user_authid(id, szSteam, charsmax(szSteam));
get_user_ip(id, szAddress, charsmax(szAddress), 1);

new iAimBotWarns = ad_get_client(id, AimWarn);
new iNoSpreadWarns = ad_get_client(id, NoSpreadWarn);

if(iAimBotWarns >= g_iAimSaveWarns)
{
TrieSetCell(g_tAimBotSteamWarns, szSteam, iAimBotWarns);
TrieSetCell(g_tAimBotIpWarns, szAddress, iAimBotWarns);
}

if(iNoSpreadWarns >= g_iSpreadSaveWarns)
{
TrieSetCell(g_tNoSpreadSteamWarns, szSteam, iNoSpreadWarns);
TrieSetCell(g_tNoSpreadIpWarns, szAddress, iNoSpreadWarns);
}
}
}
}

public ReloadCfg(id, level, cid)
{
if(~get_user_flags(id) & level) {
return PLUGIN_CONTINUE;
}

ReadCfg();

client_print(id, print_console, "[Aim Detector]: Reload Cfg.");

return PLUGIN_HANDLED;
}

public AimMenu(id, level)
{
if(~get_user_flags(id) & level) {
return PLUGIN_CONTINUE;
}

static iPlayers[32], iNum, i, iPlayer;
get_players(iPlayers, iNum, "ch");

new szName[32], szInfo[3], szTempString[96];
new iMenu = menu_create("\wAim Detector Меню", "AimMenuHandler");

new bool:bFindPlayer = false;

for(i = 0; i < iNum; i++)
{
iPlayer = iPlayers[i];

new iAimBotWarns = ad_get_client(iPlayer, AimWarn);
new iNoSpreadWarns = ad_get_client(iPlayer, NoSpreadWarn);

if(iAimBotWarns == 0 && iNoSpreadWarns == 0) {
continue;
}

bFindPlayer = true;

get_user_name(iPlayer, szName, charsmax(szName));

formatex(szTempString, charsmax(szTempString), "\w%s \r[\yAim\r: \w%d\r|\yNoSpread\r: \w%d\r]", szName, iAimBotWarns, iNoSpreadWarns);

num_to_str(iPlayer, szInfo, charsmax(szInfo));
menu_additem(iMenu, szTempString, szInfo);
}

if(bFindPlayer)
{
menu_setprop(iMenu, MPROP_NUMBER_COLOR, "\r");
menu_setprop(iMenu, MPROP_EXIT, MEXIT_ALL);
menu_setprop(iMenu, MPROP_EXITNAME, "Выход");
menu_setprop(iMenu, MPROP_NEXTNAME, "Далее");
menu_setprop(iMenu, MPROP_BACKNAME, "Назад");

menu_display(id, iMenu);
}
else
{
new szBufNotify[190];
formatex(szBufNotify, charsmax(szBufNotify), "^1[^4Aim Detector^1] ^3Список ^1в ^4меню ^3пустой^1.");
client_print_color(id, print_team_default, szBufNotify);
}

return PLUGIN_HANDLED;
}

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

new iAccess, szInfo[3], iCallback;
menu_item_getinfo(menu, item, iAccess, szInfo, charsmax(szInfo), .callback = iCallback);

new iPlayer = str_to_num(szInfo);

new iAimWarn = ad_get_client(iPlayer, AimWarn);
new iSpreadWarn = ad_get_client(iPlayer, NoSpreadWarn);

new szBufNotify[190], szName[32];
get_user_name(iPlayer, szName, charsmax(szName));

formatex(szBufNotify, charsmax(szBufNotify), "^1[^4Aim Detector^1] ^3Name ^1[^4 %s ^1] ^3AimWarn ^1[^4 %d ^1] ^3NoSpreadWarn ^1[^4 %d ^1]", szName, iAimWarn, iSpreadWarn);
client_print_color(id, print_team_default, szBufNotify);

return PLUGIN_HANDLED;
}

public ad_init(const Version[], const Map[])
{

#if defined ENABLE_LOG_FILE
get_localinfo("amxx_logs", g_FilePath, charsmax(g_FilePath));
formatex(g_LogDir, charsmax(g_LogDir), "%s/reaimdetector", g_FilePath);

if(!dir_exists(g_LogDir))
{
mkdir(g_LogDir);
}
#endif

ReadCfg();

#if defined ENABLE_LOG_FILE
new szBufLog[190];
formatex(szBufLog, charsmax(szBufLog), "Start Map [%s] AimSens [%d] AimMaxWarns [%d] NoSpreadNotifyWarns [%d] NoSpreadMaxWarns [%d]",
Map, ad_get_cfg(AimSens), g_iAimMaxWarns, ad_get_cfg(NoSpreadNotifyWarns), g_iSpreadMaxWarns);

SaveLogFile(szBufLog);
#endif

}

public ad_notify(const index, const PunishType:pType, const NotifyType:nType, const Kills, const Shots, const Warn)
{
new szBufNotify[190], szName[32];

#if defined ENABLE_LOG_FILE
new szBufLog[190], szAddress[22], szSteam[33];

get_user_ip(index, szAddress, charsmax(szAddress));
get_user_authid(index, szSteam, charsmax(szSteam));
#endif

get_user_name(index, szName, charsmax(szName));

if(pType == AIMBOT)
{
if(nType == WARNING && Warn > g_iAimNotify)
{
formatex(szBufNotify, charsmax(szBufNotify), "^1[^4Aim Detector^1] ^3Name ^1[^4 %s ^1] ^3Warn ^1[^4 %d ^1] ^3MaxWarn ^1[^4 %d ^1]", szName, Warn, g_iAimMaxWarns);
Send_Notify_Admins(index, szBufNotify);

#if defined ENABLE_LOG_FILE
formatex(szBufLog, charsmax(szBufLog), "Aim Warn Add: ID [%d] Name [%s] Steam [%s] IP [%s] Warn [%d]", index, szName, szSteam, szAddress, Warn);
SaveLogFile(szBufLog);
#endif

}
else if(nType == DETECT)
{
formatex(szBufNotify, charsmax(szBufNotify), "^1[^4Aim Detector^1] ^3Name ^1[^4 %s ^1] ^3Detected", szName);
Send_Notify_Admins(index, szBufNotify);

#if defined ENABLE_LOG_FILE
formatex(szBufLog, charsmax(szBufLog), "Aim Detected: ID [%d] Name [%s] Steam [%s] IP [%s] Warn [%d]", index, szName, szSteam, szAddress, Warn);
SaveLogFile(szBufLog);
#endif

ad_set_client(index, AimCheck, 0);

PunishPlayer(index, AIMBOT);
}
}
else if(pType == NOSPREAD)
{
if(nType == WARNING && Warn > g_iSpreadNotify)
{
formatex(szBufNotify, charsmax(szBufNotify), "^1[^4NoSpread Detector^1] ^3Name ^1[^4 %s ^1] ^3Warn ^1[^4 %d ^1]", szName, Warn, g_iSpreadMaxWarns);
Send_Notify_Admins(index, szBufNotify);

#if defined ENABLE_LOG_FILE
formatex(szBufLog, charsmax(szBufLog), "NoSpread Warn Add: ID [%d] Name [%s] Steam [%s] IP [%s] Warn [%d]", index, szName, szSteam, szAddress, Warn);
SaveLogFile(szBufLog);
#endif

}
else if(nType == DETECT)
{
formatex(szBufNotify, charsmax(szBufNotify), "^1[^4NoSpread Detector^1] ^3Name ^1[^4 %s ^1] ^3Detected", szName);
Send_Notify_Admins(index, szBufNotify);

#if defined ENABLE_LOG_FILE
formatex(szBufLog, charsmax(szBufLog), "NoSpread Detected: ID [%d] Name [%s] Steam [%s] IP [%s] Warn [%d]", index, szName, szSteam, szAddress, Warn);
SaveLogFile(szBufLog);
#endif

ad_set_client(index, NoSpreadCheck, 0);

PunishPlayer(index, NOSPREAD);
}
}
}

#if defined ENABLE_LOG_FILE
public ad_aim_reset_warn(const index, const ResetType:rType, const Kills, const Shots)
{
new szBufLog[190], szName[32], szAddress[22], szSteam[33];

get_user_name(index, szName, charsmax(szName));
get_user_ip(index, szAddress, charsmax(szAddress));
get_user_authid(index, szSteam, charsmax(szSteam));

switch(rType)
{
case KILLED:
{
formatex(szBufLog, charsmax(szBufLog), "Killed Reset: ID [%d] Name [%s] Steam [%s] IP [%s] Kills [%d] Shots [%d]", index, szName, szSteam, szAddress, Kills + 1, Shots);
SaveLogFile(szBufLog);
}
case SHOTS:
{
formatex(szBufLog, charsmax(szBufLog), "Shots Reset: ID [%d] Name [%s] Steam [%s] IP [%s] Kills [%d] Shots [%d]", index, szName, szSteam, szAddress, Kills, Shots + 1);
SaveLogFile(szBufLog);
}
case TIME:
{
formatex(szBufLog, charsmax(szBufLog), "Time Reset: ID [%d] Name [%s] Steam [%s] IP [%s] Kills [%d] Shots [%d]", index, szName, szSteam, szAddress, Kills, Shots);
SaveLogFile(szBufLog);
}
}
}
#endif

stock ReadCfg()
{
new szFilePath[64];
get_localinfo("amxx_configsdir", szFilePath, charsmax(szFilePath));
formatex(szFilePath, charsmax(szFilePath), "%s/reaimdetector.ini", szFilePath);

new FileHandle = fopen(szFilePath, "rt");

if(!FileHandle)
{
set_fail_state("Error load cfg.");
}

new szTemp[256], szKey[32], szValue[512], iSection;

while(!feof(FileHandle))
{
fgets(FileHandle, szTemp, charsmax(szTemp));
trim(szTemp);

if (szTemp[0] == '[')
{
iSection++;
continue;
}

if(!szTemp[0] || szTemp[0] == ';' || szTemp[0] == '/') {
continue;
}

strtok(szTemp, szKey, charsmax(szKey), szValue, charsmax(szValue), '=');
trim(szKey);
trim(szValue);

switch(iSection)
{
case AIM:
{
if(equal(szKey, "AIM_DETECTION"))
g_iAimDetection = str_to_num(szValue);

else if(equal(szKey, "SENS"))
g_iAimSens = str_to_num(szValue);

else if(equal(szKey, "MULTI_WARN"))
g_iAimMultiWarn = str_to_num(szValue);

else if(equal(szKey, "NOTIFY_WARNS"))
g_iAimNotify = str_to_num(szValue);

else if(equal(szKey, "MAX_WARNS"))
g_iAimMaxWarns = str_to_num(szValue);

else if(equal(szKey, "SHOTS_RESET"))
g_iAimShotsReset = str_to_num(szValue);

else if(equal(szKey, "KILLS_RESET"))
g_iAimKillsReset = str_to_num(szValue);

else if(equal(szKey, "TIME_RESET"))
g_iAimTimeReset = str_to_num(szValue);
}
case SPREAD:
{
if(equal(szKey, "NOSPREAD_DETECTION"))
g_iSpreadDetection = str_to_num(szValue);

else if(equal(szKey, "NOTIFY_WARNS"))
g_iSpreadNotify = str_to_num(szValue);

else if(equal(szKey, "MAX_WARNS"))
g_iSpreadMaxWarns = str_to_num(szValue);
}
case PUNISH:
{
if(equal(szKey, "REASON_AIMBOT"))
copy(g_szBanReason[AIMBOT], charsmax(g_szBanReason[]), szValue);

else if(equal(szKey, "BAN_TIME_AIMBOT"))
g_iBanTime[AIMBOT] = str_to_num(szValue);

else if(equal(szKey, "REASON_NOSPREAD"))
copy(g_szBanReason[NOSPREAD], charsmax(g_szBanReason[]), szValue);

else if(equal(szKey, "BAN_TIME_NOSPREAD"))
g_iBanTime[NOSPREAD] = str_to_num(szValue);

else if(equal(szKey, "PUNISH_AIMBOT"))
copy(g_szBanString[AIMBOT], charsmax(g_szBanString[]), szValue);

else if(equal(szKey, "PUNISH_NOSPREAD"))
copy(g_szBanString[NOSPREAD], charsmax(g_szBanString[]), szValue);

}
case SAVE:
{
if(equal(szKey, "TYPE"))
g_iSaveType = str_to_num(szValue);

else if(equal(szKey, "AIM_WARNS"))
g_iAimSaveWarns = str_to_num(szValue);

else if(equal(szKey, "NOSPREAD_WARNS"))
g_iSpreadSaveWarns = str_to_num(szValue);
}
case OTHER:
{
if(equal(szKey, "FLAG_ALERT"))
{
new szFlags[21];
copy(szFlags, charsmax(szFlags), szValue);

g_iAlertFlag = read_flags(szFlags);
}

else if(equal(szKey, "SEND_PROTECTION_WEAPON"))
g_iSendProtectionWeapon = str_to_num(szValue);

else if(equal(szKey, "CRASH_CHEAT"))
g_iCrashCheat = str_to_num(szValue);
}
}
}

fclose(FileHandle);

SetCfg();

return PLUGIN_CONTINUE;
}

stock SetCfg()
{
ad_set_cfg(AimDetection, g_iAimDetection);
ad_set_cfg(AimSens, g_iAimSens);
ad_set_cfg(AimMultiWarns, g_iAimMultiWarn);
ad_set_cfg(AimNotifyWarns, g_iAimNotify);
ad_set_cfg(AimMaxWarns, g_iAimMaxWarns);
ad_set_cfg(AimShotsReset, g_iAimShotsReset);
ad_set_cfg(AimKillsReset, g_iAimKillsReset);
ad_set_cfg(AimTimeReset, g_iAimTimeReset);
ad_set_cfg(NoSpreadDetection, g_iSpreadDetection);
ad_set_cfg(NoSpreadNotifyWarns, g_iSpreadNotify);
ad_set_cfg(NoSpreadMaxWarns, g_iSpreadMaxWarns);
ad_set_cfg(SendProtectionWeapon, g_iSendProtectionWeapon);
ad_set_cfg(CrashCheat, g_iCrashCheat);
}

stock PunishPlayer(id, PunishType:iType)
{
new szUserId[10], szSteam[33], szIp[17], szTime[10], szBanString[128];

formatex(szUserId, charsmax(szUserId), "#%d", get_user_userid(id));

get_user_authid(id, szSteam, charsmax(szSteam));
get_user_ip(id, szIp, charsmax(szIp), 1);

num_to_str(g_iBanTime[iType], szTime, charsmax(szTime));

copy(szBanString, charsmax(szBanString), g_szBanString[iType]);

replace_string(szBanString, charsmax(szBanString), "[userid]", szUserId);
replace_string(szBanString, charsmax(szBanString), "[steam]", szSteam);
replace_string(szBanString, charsmax(szBanString), "[ip]", szIp);
replace_string(szBanString, charsmax(szBanString), "[reason]", g_szBanReason[iType]);
replace_string(szBanString, charsmax(szBanString), "[time]", szTime);

server_cmd("%s", szBanString);
}

stock Send_Notify_Admins(const NotifyIndex, const Msg[])
{
new Players[MAX_PLAYERS], iNum, iReceiver;
get_players(Players, iNum, "ch");

for (new i = 0; i < iNum; ++i)
{
iReceiver = Players[i];

if(NotifyIndex == iReceiver || !(get_user_flags(iReceiver) & g_iAlertFlag)) {
continue;
}

client_print_color(iReceiver, print_team_default, Msg);
}
}

#if defined ENABLE_LOG_FILE
stock SaveLogFile(const LogText[])
{
new LogFileTime[32], LogTime[32], LogFile[128], LogMsg[190];

get_time("20%y.%m.%d", LogFileTime, charsmax(LogFileTime));
get_time("%H:%M:%S", LogTime, charsmax(LogTime));

formatex(LogFile, charsmax(LogFile), "%s/%s.log", g_LogDir, LogFileTime);
formatex(LogMsg, charsmax(LogMsg), "[%s] [%s] %s", LogFileTime, LogTime, LogText);

write_file(LogFile, LogMsg, -1);
}
#endif

#if (AMXX_VERSION_NUM < 183)
stock client_print_color(const id, const iSender, const input[], any:...)
{
static iSayText = 0;
if (!iSayText) {
iSayText = get_user_msgid("SayText");
}
new iReceiver, iNum = 1, Players[MAX_PLAYERS], Msg[190];
vformat(Msg, charsmax(Msg), input, 3);
if(id)
{
if(!is_user_connected(id)) {
return;
}
Players[0] = id;
} else {
get_players(Players, iNum, "ch");
}
for (new i = 0; i < iNum; i++)
{
iReceiver = Players[i];
message_begin(MSG_ONE, iSayText , _, iReceiver);
write_byte(iSender ? iSender : iReceiver);
write_string(Msg);
message_end();
}
}
#endif
Вообщем дело было так. Был сервер на обычном тарифе. Решил я его перебросить на VDS. Просто перенес его и вот образовались ошибки. На сервере откуда переносил вссё работало прекрасно и без ошибок. Тут почему то вылезли ошибки
В консоле
L 06/19/2020 - 10:45:42: Couldn't write file "cstrike/addons/amxmodx/logs/reaimdetector/2020.06.19.log"
L 06/19/2020 - 10:45:42: [AMXX] Displaying debug trace (plugin "reaimdetector.amxx", version "0.2.2")
L 06/19/2020 - 10:45:42: [AMXX] Run time error 10: native error (native "write_file")
L 06/19/2020 - 10:45:42: [AMXX] [0] reaimdetector.sma::SaveLogFile (line 745)
L 06/19/2020 - 10:45:42: [AMXX] [1] reaimdetector.sma::ad_init (line 441)


И вот еще в мета листе
[ 4] <processcmds_mm badf load processcmds_mm_i v - ini - -

Помогите разобраться.

PS reaimdetector я переустановил даже с вашего форума. Он как я понял работает но с ошибкой.
PSs лога cstrike/addons/amxmodx/logs/reaimdetector/2020.06.19.log нет в папке почему то . Права доступа на папке 755
 
В этой теме было размещено решение! Перейти к решению.
Сообщения
12
Реакции
0
present, я и там сижу как раз. Был тариф PRO . А щас у них же взял VDS. Через ПУ смотрю и вижу что ProcessCmds на PRO тарифе установлен и работает прекрасно. А на VDS как раз таки не пашет почему то
 
Сообщения
1,340
Реакции
529
Помог
91 раз(а)
вместо processcmds ставьте ReAuthCheck либо обращайтесь к ТП мурена.
 
Сообщения
12
Реакции
0
present, В ТП уже отписал. пока тишина. И насчет reaimdetector тоже им написал. Ну с ним ладно. Надо починить reaimdetector
 
Сообщения
64
Реакции
131
Помог
4 раз(а)
Процесс там работает только на игровых серверах, на VDS он не будет работать, даже на ареновских.
write_file - это 100% нет прав на запись
 
Сообщения
12
Реакции
0
BaHeK, ну судя потому что нет лога сегодняшнего то да. Но как их дать. Права 777 чтоли на логи поставить?
 
Сообщения
64
Реакции
131
Помог
4 раз(а)
BaHeK, ну судя потому что нет лога сегодняшнего то да. Но как их дать. Права 777 чтоли на логи поставить?
Лучше поставить владельца на всю дирректорию сервера рекурсивно, чем позволять всем подряд запись в папку
chown -R user:group server_dir
PS: user и group обычно одинаковые
 
Сообщения
12
Реакции
0
BaHeK, ничего не понял как это сделать :D
Я в этом очень мало что понимаю
19 Июн 2020
BaHeK, Поставил просто 777 права. Всё норм сразу стало) А как сделать права как вы сказали я к сожалению не шарю)
19 Июн 2020
Тему клоз. Спасибо за ответы)
 
Статус
В этой теме нельзя размещать новые ответы.

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

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