Пользователь
- Сообщения
- 20
- Реакции
- 0
- Ошибка
-
L 04/12/2022 - 20:25:59: [AMXX] Plugin ("jbe_guard_block.amxx") is setting itself as failed.
L 04/12/2022 - 20:25:59: [AMXX] Plugin says: Can't connect to MySQL server on '135.181.181.81' (4)
L 04/12/2022 - 20:25:59: [AMXX] Displaying debug trace (plugin "jbe_guard_block.amxx", version "1.0")
L 04/12/2022 - 20:25:59: [AMXX] Run time error 1: forced exit
L 04/12/2022 - 20:25:59: [AMXX] [0] jbe_guard_block.sma::Task_MySQL_Connect (line 68)
L 04/12/2022 - 20:25:59: [AMXX] [1] jbe_guard_block.sma::UTIL_GetCvarString (line 220)
L 04/12/2022 - 20:25:59: [AMXX] [2] jbe_guard_block.sma::Task_MySQL_Connect (line 65)
- ОС
- Linux
- Amx Mod X
-
1.9.0
- Билд
-
ReHLDS version: 3.11.0.767-dev
Build date: 03:13:55 Oct 25 2021 (2753)
Build from: https://github.com/dreamstalker/rehlds/commit/471158b
- ReGamedll
-
ReGameDLL version: 5.21.0.546-dev
Build date: 15:32:48 Dec 28 2021
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/09a6c61
- Версия 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
- Список метамодулей
-
description stat pend file vers src load unload
[ 1] Reunion RUN - reunion_mm_i386.so v0.1.0.92c 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] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5271 ini Start ANY
[ 5] Revoice RUN - revoice_mm_i386.so v0.1.0.34 ini Start Never
[ 6] Placeholders disabler RUN - plfix_mm_i386.so v0.0.3 ini Start Never
[ 7] Ultimate Unprecacher RUN - unprecacher.so vBeta 2.5.3 ini Chlvl Chlvl
[ 8] <rechecker.so> badf - rechecker.so v - ini - -
[ 9] MySQL RUN - mysql_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[10] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[11] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[12] Fun RUN - fun_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[13] Engine RUN - engine_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[14] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[15] CSX RUN - csx_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[16] ReAPI RUN - reapi_amxx_i386.so v5.21.0.252-dev pl4 ANY Never
[17] gRIP RUN - grip_amxx_i386.so v0.1.3 Beta pl4 ANY ANY
17 plugins, 16 running
- Список плагинов
-
description stat pend file vers src load unload
[ 1] Reunion RUN - reunion_mm_i386.so v0.1.0.92c 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] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5271 ini Start ANY
[ 5] Revoice RUN - revoice_mm_i386.so v0.1.0.34 ini Start Never
[ 6] Placeholders disabler RUN - plfix_mm_i386.so v0.0.3 ini Start Never
[ 7] Ultimate Unprecacher RUN - unprecacher.so vBeta 2.5.3 ini Chlvl Chlvl
[ 8] <rechecker.so> badf - rechecker.so v - ini - -
[ 9] MySQL RUN - mysql_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[10] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[11] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[12] Fun RUN - fun_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[13] Engine RUN - engine_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[14] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[15] CSX RUN - csx_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[16] ReAPI RUN - reapi_amxx_i386.so v5.21.0.252-dev pl4 ANY Never
[17] gRIP RUN - grip_amxx_i386.so v0.1.3 Beta pl4 ANY ANY
17 plugins, 16 running
description stat pend file vers src load unload
[ 1] Reunion RUN - reunion_mm_i386.so v0.1.0.92c 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] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5271 ini Start ANY
[ 5] Revoice RUN - revoice_mm_i386.so v0.1.0.34 ini Start Never
[ 6] Placeholders disabler RUN - plfix_mm_i386.so v0.0.3 ini Start Never
[ 7] Ultimate Unprecacher RUN - unprecacher.so vBeta 2.5.3 ini Chlvl Chlvl
[ 8] <rechecker.so> badf - rechecker.so v - ini - -
[ 9] MySQL RUN - mysql_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[10] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[11] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[12] Fun RUN - fun_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[13] Engine RUN - engine_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[14] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[15] CSX RUN - csx_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[16] ReAPI RUN - reapi_amxx_i386.so v5.21.0.252-dev pl4 ANY Never
[17] gRIP RUN - grip_amxx_i386.so v0.1.3 Beta pl4 ANY ANY
17 plugins, 16 running
amxx plugins
Currently loaded plugins:
name version author file status
[ 1] FreshBans 1.3.8b kanagava fresh_bans_for_ running
[ 2] admin_loader 0.4 kanagava admin_loader-18 running
[ 3] Admin Commands 1.8.2 AMXX Dev Team admincmd.amxx running
[ 4] Multi-Lingual System 1.8.2 AMXX Dev Team multilingual.am running
[ 5] Maps Menu 1.9.0.5263 AMXX Dev Team mapsmenu.amxx running
[ 6] Admin Chat 1.8.2 AMXX Dev Team adminchat.amxx running
[ 7] Scrolling Message 1.8.2 AMXX Dev Team scrollmsg.amxx running
[ 8] Info. Messages 1.8.2 AMXX Dev Team imessage.amxx running
[ 9] Admin Votes 1.8.2 AMXX Dev Team adminvote.amxx running
[ 10] TimeLeft 1.8.2 AMXX Dev Team timeleft.amxx running
[ 11] [Побег из ст▒ 1.0 Sanlerus jbe_core.amxx debug
[ 12] Autoresponder/Advertis 0.5 MaximusBrood ad_manager.amxx running
[ 13] [JBE_DM] Birth Day 1.1 Freedo.m jbe_dm_birthday running
[ 14] [JBE_DM] Ghosts 1.1 Freedo.m jbe_dm_ghosts.a running
[ 15] [JBE_DM] Hide And Seek 1.1 Freedo.m jbe_dm_hideands running
[ 16] [JBE_DM] Ringolevio 1.1 Freedo.m jbe_dm_ringolev running
[ 17] [JBE_DM] Sparta 1.1 Freedo.m jbe_dm_sparta.a running
[ 18] Parachute 1.0 maeStro parachute.amxx running
[ 19] AdminListen 2.5 /dev/ urandom V adminlisten.amx running
[ 20] JBE Guard block :: MyS 1.0 OverGame jbe_guard_block error
[ 21] Clans System 0.1 Veliky clans.amxx running
[ 22] Game Namer Version 1. NeuroToxin gamenamechanger running
[ 23] [JBE] Ultimate Bank vk.com/kri ToJI9IHGaa jbe_bank.amxx running
[ 24] [JBE] Grab + Menu 5.2 Edit By NiKiTa jbe_grab.amxx running
[ 25] [JBE] Vampire FIX/07.11. KOTIK / vk.com/s aMenuVampira201 running
[ 26] [JBE] Guardian Menu 1.0 Geneor GuardianMenu.am running
[ 27] [JBE] PLMENU v1.0 vk.com/slavajb jbe_plmenu.amxx running
[ 28] HK416 1.0 DRUID hk416.amxx running
[ 29] [JB] Boss Menu [v2.6] Edit By NiKiTa JB_BossMenu.amx running
[ 30] Auto recording demo 2.0 IzI | Bonaqua (R amx_autodemorec running
[ 31] CS Revo: Camera New 1.0 Nani | Wilian M. csrevo_camera_n running
[ 32] [AMXX] Admin Gift 02.01.2018 Edit By Number O OnlineGiveAdmin running
[ 33] [ZP] Extra: Lightning 1.0 Crock / =) (Popr azp_weapon_guit running
[ 34] ZP Extraitem: Mauser C 1.1 Base: Batcon; Re zp_extraitems_m running
[ 35] HUD MESSAGE 1.0 DEN67 reklama.amxx running
[ 36] Test Connect Sql 1.0 OverGame sql_test.amxx debug
[ 37] HUD Customizer 0.3 Igoreso hud_customizer. running
[ 38] CSStatsX SQL 0.7.4+2 serfreeman1337 csstatsx_sql.am running
[ 39] GameCMS_API 5.4.9 zhorzh78 gamecms_api.amx running
[ 40] Custom Models 1.3.2 neugomon CustomModels.am running
[ 41] Lite Translit 2.8 neygomon lite_translit1. running
[ 42] Master Servers Check 4.8 Javekson ms_check.amxx running
[ 43] [ZP 4.3] Addon: Dog pe 1.0 (Beta) MKOD for vk.com/ zp_addon_alien_ running
[ 44] [ZP 4.3] Addon: Dog pe 1.0 (Beta) MKOD for vk.com/ zp_addon_angra_ running
[ 45] [ZP 4.3] Addon: Dog pe 1.0 (Beta) MKOD for vk.com/ zp_addon_dog_pe running
[ 46] [ZP 4.3] Addon: Dog pe 1.0 (Beta) MKOD for vk.com/ zp_addon_effigy running
[ 47] unknown unknown unknown zp_addon_jumps. running
[ 48] [Pet] Addon: Pet's men 1.0 MKOD zp_addon_menu_p running
[ 49] [ZP 4.3] Addon: Dog pe 1.0 (Beta) MKOD for vk.com/ zp_addon_pika_p running
[ 50] [ZP 4.3] Addon: Dog pe 1.0 (Beta) MKOD for vk.com/ zp_addon_raptor running
[ 51] [ZP 4.3] Addon: Dog pe 1.0 (Beta) MKOD for vk.com/ zp_addon_scorpi running
[ 52] [ZP 4.3] Addon: Dog pe 1.0 (Beta) MKOD for vk.com/ zp_addon_stich_ running
[ 53] Discord Reports 0.2 paffgame discord.amxx running
[ 54] Telegram MSG 1.2.0 ex3m777 bottg.amxx running
[ 55] Zephyr-G Swoop 1.5A GlobalModders.ne Zephyr-G_Swoop. debug
[ 56] AMX Piss 2.2 KRoTaL amx_piss.amxx running
[ 57] [ZP] Extra: MG3 1.0 Crock / =) (Popr azp_weapon_mg3. running
[ 58] [ZP] Extra: Dual Infin 1.0 Crock / =) (Popr azp_weapon_infi running
[ 59] [ZP] Extra: XM8 Limit 1.0 LARS-BLOODLIKER yt_weapon_xm8_n running
[ 60] [ZP] Extra: Dual Deagl 1.0 LARS-DAY[BR]EAKE azp_weapon_ddea running
[ 61] [JB] Weapon: AK-47 Kni 1.0 Crock / =) knifebykene1x.a running
[ 62] iHOOK 1.0 arttty7 iHOOK.amxx running
[ 63] Map Manager: Core 3.1.4 Mistrick map_manager_cor running
[ 64] Map Manager: Scheduler 0.1.9 Mistrick map_manager_sch running
[ 65] Admin Mapmenu 0.5.3 d3m37r4 admin_mapmenu.a error
[ 66] Map Manager: Rtv 0.1.1 Mistrick map_manager_rtv running
( 20) Error: Can't connect to MySQL server on '135.181.181.81' (4)
- Автор плагина
- OverGame
- Версия плагина
- MySQL
- Исходный код
-
#include <amxmodx>
#include <sqlx>
/* [Макросы | начало] */
#define VERSION "1.0"
#define ACCESS ADMIN_BAN
#define MAXCLIENTS 32
#define cmax(%0) sizeof(%0) - 1
#define is_user_admin(%0) (get_user_flags(%0) > 0 && ~get_user_flags(%0) & ADMIN_USER)
#define TASK_INDEX_MYSQL 28819293
#define SetBit(%0,%1) ((%0) |= (1 << (%1)))
#define ClearBit(%0,%1) ((%0) &= ~(1 << (%1)))
#define IsSetBit(%0,%1) ((%0) & (1 << (%1)))
#define InvertBit(%0,%1) ((%0) ^= (1 << (%1)))
#define IsNotSetBit(%0,%1) (~(%0) & (1 << (%1)))
#if AMXX_VERSION_NUM < 183
#include <colorchat>
#define client_disconnected client_disconnect
#endif
/* [Макросы | конец] */
/* [Нативы | начало] */
native jbe_informer_offset_up(id);
native jbe_informer_offset_down(id);
native jbe_get_user_team(id);
native jbe_set_user_team(id, iTeam);
/* [Нативы | конец] */
/* [Переменные | начало] */
new Handle:hSql, Handle:hConnected;
new g_iBitUserBlock;
new uSteamId[33][35], uIpAddress[33][23];
/* [Переменные | конец] */
public plugin_init() {
register_plugin("JBE Guard block :: MySQL", VERSION, "OverGame");
register_cvar("jbe_sql_hostname", "195.88.209.239");
register_cvar("jbe_sql_username", "u2012_wa");
register_cvar("jbe_sql_password", "wasd123");
register_cvar("jbe_sql_database", "u10044_wa");
register_cvar("jbe_sql_prefixes", "bk_");
register_concmd("block_guard", "ConCmd_SayBlock");
register_concmd("say /block", "ConCmd_SayBlock");
register_concmd("say_team /block", "ConCmd_SayBlock");
}
public plugin_cfg() {
new sPatch[64];
get_localinfo("amxx_configsdir", sPatch, cmax(sPatch));
server_cmd("exec %s/jbe_sql_data.cfg", sPatch);
set_task(1.0, "Task_MySQL_Connect", TASK_INDEX_MYSQL);
}
public Task_MySQL_Connect(i_Task) {
new iErr, sErr[256];
hSql = SQL_MakeDbTuple(UTIL_GetCvarString("jbe_sql_hostname"), UTIL_GetCvarString("jbe_sql_username"), UTIL_GetCvarString("jbe_sql_password"), UTIL_GetCvarString("jbe_sql_database"));
if((hConnected = SQL_Connect(hSql, iErr, sErr, cmax(sErr))) == Empty_Handle) {
set_fail_state(sErr);
}
else {
SQL_QueryAndIgnore(hConnected, "set names utf8");
SQL_Execute((SQL_PrepareQuery(hConnected, "CREATE TABLE IF NOT EXISTS `%slist_blocks` (`id` int(9) NOT NULL AUTO_INCREMENT,`steam_id` varchar(35) NOT NULL,`ip` varchar(32) NOT NULL,PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=22;", UTIL_GetCvarString("jbe_sql_prefixes"))));
}
SQL_FreeHandle(hConnected);
remove_task(i_Task);
}
public client_putinserver(id) {
get_user_authid(id, uSteamId[id], cmax(uSteamId[]));
get_user_ip(id, uIpAddress[id], cmax(uIpAddress[]), 1);
new sQuery[256], iClient[3];
formatex(sQuery, charsmax(sQuery), "SELECT * FROM `%slist_blocks` WHERE (`steam_id` LIKE '%s')", UTIL_GetCvarString("jbe_sql_prefixes"), uSteamId[id]);
iClient[0] = id;
iClient[1] = 2;
SQL_ThreadQuery(hSql, "SQL_Handler", sQuery, iClient, sizeof iClient);
}
public client_disconnected(id) {
if(IsSetBit(g_iBitUserBlock, id))
ClearBit(g_iBitUserBlock, id);
}
public SQL_Handler(iFailState, Handle:iQuery, szError[], iError, szData[], iDataLen) {
switch(iFailState) {
case TQUERY_CONNECT_FAILED: return log_amx("No connect database: %s", szError);
case TQUERY_QUERY_FAILED: return log_amx("Query error: %s", szError);
}
new id = szData[0], iType = szData[1];
/* [SELECT * FROM `users` WHERE (`users`.`steam_id` = '%s')] */
/* [INSERT INTO `users` (`steam_id`, `level`, `exp`) VALUES ('%s', '0', '0');] */
switch(iType) {
case 1: {
if(SQL_NumResults(iQuery)) {
SetBit(g_iBitUserBlock, id);
}
else {
new szName[33], sQuery[148], iClient[2];
get_user_name(id, szName, charsmax(szName));
iClient[0] = id;
iClient[1] = 0;
formatex(sQuery, charsmax(sQuery), "INSERT INTO `%slist_blocks` (`steam_id`, `ip`) VALUES ('%s', '%s')", UTIL_GetCvarString("jbe_sql_prefixes"), uSteamId[id], uIpAddress[id]);
SQL_ThreadQuery(hSql, "SQL_Handler", sQuery, iClient, sizeof iClient);
}
}
case 2: {
if(SQL_NumResults(iQuery)) {
SetBit(g_iBitUserBlock, id);
}
}
}
return true;
}
public ConCmd_SayBlock(id) {
if(get_user_flags(id) & ACCESS) {
return Open_BlockMenu(id);
}
client_print_color(id, print_team_grey, "^04[БЛОК] ^01У вас недостаточно прав!");
return PLUGIN_HANDLED;
}
public Open_BlockMenu(id) {
new sTemp[10], sDataString[128], iMenu = menu_create("Блокировка охраны", "Close_BlockMenu");
jbe_informer_offset_up(id);
for(new i = 1; i <= MAXCLIENTS; i++) {
if(!is_user_connected(i) || i == id || is_user_admin(i))
continue;
get_user_name(i, sDataString, cmax(sDataString));
num_to_str(i, sTemp, cmax(sTemp));
formatex(sDataString, cmax(sDataString), "%s%s\R%s", sDataString, IsSetBit(g_iBitUserBlock, i) ? "\r*" : "", (jbe_get_user_team(i) == 2) ? "\yGUARD" : "\rPRISON");
menu_additem(iMenu, sDataString, sTemp);
}
return menu_display(id, iMenu, 0);
}
public Close_BlockMenu(id, iMenu, aItem) {
jbe_informer_offset_down(id);
new sData[30], sName[64], iAccess, iCallBack;
menu_item_getinfo(iMenu, aItem, iAccess, sData, cmax(sData), sName, cmax(sName), iCallBack);
new iPlayer = str_to_num(sData);
if(0 < iPlayer <= MAXCLIENTS) {
new sQuery[256], iClient[3];
if(IsNotSetBit(g_iBitUserBlock, iPlayer)) {
SetBit(g_iBitUserBlock, iPlayer);
formatex(sQuery, charsmax(sQuery), "SELECT * FROM `%slist_blocks` WHERE `steam_id` LIKE '%s'", UTIL_GetCvarString("jbe_sql_prefixes"), uSteamId[iPlayer]);
iClient[0] = iPlayer;
iClient[1] = 1;
SQL_ThreadQuery(hSql, "SQL_Handler", sQuery, iClient, sizeof iClient);
}
else {
ClearBit(g_iBitUserBlock, iPlayer);
formatex(sQuery, charsmax(sQuery), "DELETE FROM `%slist_blocks` WHERE `%slist_blocks`.`steam_id`='%s'", UTIL_GetCvarString("jbe_sql_prefixes"), UTIL_GetCvarString("jbe_sql_prefixes"), uSteamId[iPlayer]);
iClient[0] = iPlayer;
iClient[1] = 0;
SQL_ThreadQuery(hSql, "SQL_Handler", sQuery, iClient, sizeof iClient);
}
new sNickname[33], sTargetName[33];
get_user_name(id, sNickname, cmax(sNickname));
get_user_name(iPlayer, sTargetName, cmax(sTargetName));
if(jbe_get_user_team(iPlayer) == 2)
jbe_set_user_team(iPlayer, 1);
client_print_color(0, print_team_grey, "^04[БЛОК] ^03[%s] ^01%s вход за охрану для ^03[%s]^0!", sNickname, IsSetBit(g_iBitUserBlock, iPlayer) ? "заблокировал" : "разблокировал", sTargetName);
log_to_file("/addons/amxmodx/logs/blocks.txt", "^n^n[BLOCK SYSTEM BY OVERGAME]^nАдминистратор [%s]^nНарушитель [%s]^nСтатус: %s", sNickname, sTargetName, IsSetBit(g_iBitUserBlock, iPlayer) ? "заблокирован" : "разблокирован");
}
return PLUGIN_HANDLED;
}
public plugin_natives()
register_native("jbe_is_gblock", "jbe_is_gblock", true);
public jbe_is_gblock(id)
return IsSetBit(g_iBitUserBlock, id);
stock UTIL_GetCvarString(const s_String[]) {
new sDataString[128];
get_cvar_string(s_String, sDataString, cmax(sDataString));
return sDataString;
}
Все данные ввел верно(Вводил в исходнике и в самом файле, толку ноль)