GameCMS Flags

Статус
В этой теме нельзя размещать новые ответы.

amega

Пользователь
Регистрация
3 Сен 2019
Сообщения
66
Симпатии
1
Прикладывайте логи полностью.
OS
Linux
Amx Mod X
AMXX 1.9.0
Билд
ReHLDS version: 3.8.0.723
ReGamedll
ReGameDLL version: 5.20.0.492-dev
Metamod
Metamod v1.21p37
Meta модули
Код:
[ 1] Reunion RUN - reunion_mm_i386. v0.1.92d ini Start Never
[ 2] Rechecker RUN - rechecker_mm_i38 v2.5 ini Chlvl ANY
[ 3] AMX Mod X RUN - amxmodx_mm_i386. v1.9.0.5 ini Start ANY
[ 4] ReSRDetector RUN - resrdetector_mm_ v0.1.0 ini Chlvl ANY
[ 5] ReAuthCheck RUN - reauthcheck_mm_i v0.1.6 ini Start Never
[ 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] ReSemiclip RUN - resemiclip_mm_i3 v2.3.9 ini Chlvl ANY
[ 9] SafeNameAndChat RUN - SafeNameAndChat. v1.1 ini ANY ANY
[10] YaPB RUN - yapb.so v4.2.598 ini Chlvl ANY
[11] ReAimDetector RUN - reaimdetector_am v0.2.2 pl3 ANY Never
[12] GeoIP RUN - geoip_amxx_i386. v1.9.0.5 pl3 ANY ANY
[13] MySQL RUN - mysql_amxx_i386. v1.9.0.5 pl3 ANY ANY
[14] Engine RUN - engine_amxx_i386 v1.9.0.5 pl3 ANY ANY
[15] FakeMeta RUN - fakemeta_amxx_i3 v1.9.0.5 pl3 ANY ANY
[16] AuthEmu RUN - authemu_amxx_i38 v5.2.12. pl3 ANY Never
[17] ReAPI RUN - reapi_amxx_i386. v5.19.0. pl3 ANY Never
[18] Ham Sandwich RUN - hamsandwich_amxx v1.9.0.5 pl3 ANY ANY
[19] CSX RUN - csx_amxx_i386.so v1.9.0.5 pl3 ANY ANY
[20] CStrike RUN - cstrike_amxx_i38 v1.9.0.5 pl3 ANY ANY
Плагины
Код:
[ 1] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 2] GameCMS_API 5.4.9 zhorzh78 gamecms_api_5.4 running
[ 3] [182] VoteBan L4D 17.10.30 Sanlerus voteban_l4d.amx running
[ 4] FreshBans 1.4.3b kanagava fresh_bans_143_ running
[ 5] [190] Cvar On Map 20.06.06 SKAJIbnEJIb cvar_on_map.amx running
[ 6] [190] Screen Player 20.06.06 SKAJIbnEJIb screen_player.a running
[ 7] Uber Sounds 1.1 kz4fun uber_sounds.amx running
[ 8] Advanced Kill Assists 1.3c Xelson next21_kill_ass running
[ 9] [190] Army Ranks Ultim 20.06.06 SKAJIbnEJIb army_ranks_ulti running
[ 10] [190] CsStats MySQL 20.06.06 SKAJIbnEJIb csstats_mysql.a running
[ 11] AR Double 14.12.02 SKAJIbnEJIb ar_double.amxx running
[ 12] [190] AR Bets 20.06.06 SKAJIbnEJIb ar_bets.amxx paused
[ 13] Pause Plugins 1.9.0.5271 AMXX Dev Team pausecfg.amxx running
[ 14] [190] Stats Configurat 20.06.06 SKAJIbnEJIb & AM statscfg_rbs.am running
[ 15] [190] StatsX RBS 20.06.06 SKAJIbnEJIb & AM statsx_rbs.amxx running
[ 16] Admin Commands 1.9.0.5271 AMXX Dev Team admincmd.amxx running
[ 17] Slots Reservation 1.9.0.5271 AMXX Dev Team adminslots.amxx running
[ 18] Menus Front-End 20.06.06 SKAJIbnEJIb & AM amxmodmenu_rbs. running
[ 19] Commands Menu 1.9.0.5271 AMXX Dev Team cmdmenu.amxx running
[ 20] Players Menu 1.7 neugomon players_menu.am running
[ 21] Teleport Menu 1.9.0.5271 AMXX Dev Team telemenu.amxx running
[ 22] Maps Menu 1.9.0.5271 AMXX Dev Team mapsmenu.amxx running
[ 23] Plugin Menu 1.9.0.5271 AMXX Dev Team pluginmenu.amxx running
[ 24] Restrict Weapons 1.9.0.5271 AMXX Dev Team restmenu.amxx running
[ 25] Admin Chat 1.9.0.5271 AMXX Dev Team adminchat.amxx running
[ 26] [190] Chat Controller 20.06.06 SKAJIbnEJIb chat_controller running
[ 27] Scrolling Message 1.9.0.5271 AMXX Dev Team scrollmsg.amxx running
[ 28] Info. Messages 1.9.0.5271 AMXX Dev Team imessage.amxx running
[ 29] Admin Votes 1.9.0.5271 Wildness Team adminvote.amxx running
[ 30] Autoresponder/Advertis 0.5 MaximusBrood ad_manager.amxx running
[ 31] Lite MapChooser 2.6 neygomon lite_mapchooser running
[ 32] ReChecker Logging freesrv AMXX rc_logging.amxx running
[ 33] RC BaseChanger freesrv AMXX rc_basechanger. running
[ 34] Master Servers Check 2.0 Javekson ms_check.amxx running
[ 35] AntiSpam FlashLight 1.0 Leo_[BH] flashlight_no_s running
[ 36] [190] High Ping Kicker 20.06.06 SKAJIbnEJIb hpk_rbs.amxx running
[ 37] AFK Control ReNew 1.2(a) neygomon afk_control.amx running
[ 38] Spect Bot 1.2 SKAJIbnEJIb & Bo SpectBot.amxx running
[ 39] C4_Block 1.0 SNauPeR C4_Block.amxx paused
[ 40] FPS Meter 1.1 neygomon fps.amxx running
[ 41] Flashbang Ban 0.3 mx?! flashbang_ban.a running
[ 42] Auto recording demo 2.0 IzI | Bonaqua (R amx_autodemorec running
[ 43] [ReAPI] Advanced Team 0.1.0 Vaqtincha AdvancedTeamCho running
[ 44] GameName Changer 1.0 neugomon gamename_change running
[ 45] Advanced Ultimate Weap 0.1.0b steelzzz auw.amxx running
[ 46] unknown unknown unknown ultimate_weapon running
[ 47] [AUW] Addon: Weapon Ma 0.0.3 xxx auw_addon_maps. running
[ 48] [190] VIP RBS 20.07.20 SKAJIbnEJIb vip_rbs.amxx running
[ 49] [190] AR Vampire 20.06.06 SKAJIbnEJIb ar_vampire.amxx running
[ 50] [190] Ultimate Models 20.06.06 SKAJIbnEJIb ultimate_models running
[ 51] [ReAPI] Healthnade 0.0.2 F@nt0M reapi_healthnad running
[ 52] Map Spawns Editor 1.0.16 iG_os map_spawns_edit running
[ 53] [182] PTB RBS 20.06.06 SKAJIbnEJIb ptb_rbs.amxx running
[ 54] Parachute 1.0 maeStro parachute.amxx running
[ 55] Mode 2x2 2.5re s1lent mode.amxx running
[ 56] [ReAPI] AWPoff 1.4.3 PAffAEJIkA :3 awp_off.amxx running
[ 57] Damager 0.0.5 steelzzz damager.amxx running
[ 58] ResetScore 1.0 Leo_[BH] resetscore_reap running
[ 59] [182] Crux Ansata 17.10.30 Sanlerus crux_ansata.amx running
[ 60] Nade Messages 1.0 v3x nademessages.am running
[ 61] Death Gift 2.0.0 ArKaNeMaN DeathGift.amxx running
[ 62] [DG] More Bonuses 2.0.0 ArKaNeMaN DG_MoreBonuses. running
[ 63] [DG] More Funcs 2.0.0 ArKaNeMaN DG_MoreFuncs.am running
[ 64] [DG] ARU Ext. 1.0.0 ArKaNeMaN DG_Aru.amxx running
[ 65] [DG] AUW Ext. 1.0.0 ArKaNeMaN DG_Auw.amxx running
[ 66] [DG] Misc Bonuses 1.0.0 ArKaNeMaN DG_Misc.amxx running
[ 67] [190] Hostage Mod 20.08.08 SKAJIbnEJIb hostage_mod.amx running
[ 68] [190] Real Hostages 20.06.06 SKAJIbnEJIb & Av real_hostages.a running
[ 69] GameCMS Flags 1.2f OverGame gamecms_flags.a running
[ 70] GameCMS_Achievs_Core 1.3 zhorzh78 gamecms_achievs running
[ 71] GameCMS_Player_Achievs 1.3 zhorzh78 player_achievs_ running
[ 72] GameCMS_Special_Achiev 1.3 zhorzh78 special_achievs running
[ 73] GameCMS_Bomb_Achievs 1.2 zhorzh78 bomb_achievs_1. stopped
[ 74] CMS Achevs Reward 3.0 ApXuTekToR CMSAchevs_Rewar running
[ 75] GameCMS BonusSystem 1.1 +- DUKKHAZ0R gamecms_bonus.a running
[ 76] [ReAPI] TopRoundDamage 1.0.6 Dager* *.* -G- damage_round.am running
[ 77] Win Team 1.0 maFFyoZZyk win_team.amxx paused
[ 78] Knife Duel with Telepo 1.2 neygomon knife_duel.amxx paused
[ 79] Online Helper 2.1.3 Nordic Warrior online_helper.a running
[ 80] ChatAdditions: Core v1.5.0 Sergey Shorokhov ChatAdditions_C running
[ 81] ChatAdditions: GameCMS v1.5.0 Sergey Shorokhov CA_Storage_Game running
[ 82] CA: Mute v1.5.0 Sergey Shorokhov CA_Mute.amxx running
[ 83] CA Addon: Death mute v1.5.0 Sergey Shorokhov CA_Addon_DeathM running
[ 84] CA: Gag v1.5.0 Sergey Shorokhov CA_Gag.amxx running
[ 85] [190] Chat RBS 20.06.06 SKAJIbnEJIb chat_rbs.amxx running
Amxx Модули
Код:
ReAimDetector 0.2.2 ReHLDS Team running
GeoIP 1.9.0.5271 AMX Mod X Dev Team running
MySQL 1.9.0.5271 AMX Mod X Dev Team running
Engine 1.9.0.5271 AMX Mod X Dev Team running
FakeMeta 1.9.0.5271 AMX Mod X Dev Team running
nVault 1.0.0-manu AMX Mod X Dev Team running
AuthEmu 5.2.12.425 Dev-MS.ru running
ReAPI 5.19.0.211 Asmodai & s1lent running
Ham Sandwich 1.9.0.5271 AMX Mod X Dev Team running
CSX 1.9.0.5271 AMX Mod X Dev Team running
CStrike 1.9.0.5271 AMX Mod X Dev Team running
JSON 1.9.0.5271 AMX Mod X Dev Team running
Sockets2 1.8.1.3746 HLSW Dev Team running
RegEx 1.9.0.5271 AMX Mod X Dev Team running
Ошибка
Код:
L 04/01/2021 - 11:24:09: [AMXX] Displaying debug trace (plugin "gamecms_flags.amxx", version "1.2f")
L 04/01/2021 - 11:24:09: [AMXX] Run time error 10: native error (native "SQL_ThreadQuery")
L 04/01/2021 - 11:24:09: [AMXX] [0] gamecms_flags.sma::client_putinserver (line 71)
Исходник
Код:
#include <amxmodx>
#include <sqlx>

#define VERSION "1.2f"

#define TASK_INDEX_MYSQL 1337
#define TASK_INDEX_INFO 2337

#define CVAR_HOSTNAME 0
#define CVAR_USERNAME 1
#define CVAR_PASSWORD 2
#define CVAR_DATABASE 3
#define CVAR_TABLE_USERS 4
#define CVAR_FLAGS 5
#define CVAR_GIVE 6
#define CVAR_TIME 7

static g_iCvars[8];
static Handle:iSql, Handle:iConnect, szTable[64];

public plugin_init() {
register_plugin("GameCMS Flags", VERSION, "OverGame");
register_dictionary("gcms_flags.txt");

g_iCvars[CVAR_FLAGS] = register_cvar("gcms_rf_flags", "");
g_iCvars[CVAR_GIVE] = register_cvar("gcms_rf_info", "");
g_iCvars[CVAR_TIME] = register_cvar("gcms_rf_time", "");

g_iCvars[CVAR_HOSTNAME] = register_cvar("gcms_hostname", ""); /* Адрес базы данных */
g_iCvars[CVAR_USERNAME] = register_cvar("gcms_username", ""); /* Пользователь базы данных */
g_iCvars[CVAR_PASSWORD] = register_cvar("gcms_password", ""); /* Пароль пользователя */
g_iCvars[CVAR_DATABASE] = register_cvar("gcms_database", ""); /* Имя базы данных */
g_iCvars[CVAR_TABLE_USERS] = register_cvar("gcms_table_users", ""); /* Таблица */
}

public plugin_cfg() {
new szConfigs[64];
get_localinfo("amxx_configsdir", szConfigs, charsmax(szConfigs));
server_cmd("exec %s/gamecms_flags.cfg", szConfigs);

set_task(1.0, "task_mysql_connect", TASK_INDEX_MYSQL);
}

public task_mysql_connect(task) {
new iError, szError[128];

copy(szTable, charsmax(szTable), cvar_string(g_iCvars[CVAR_TABLE_USERS]));

iSql = SQL_MakeDbTuple(
cvar_string(g_iCvars[CVAR_HOSTNAME]),
cvar_string(g_iCvars[CVAR_USERNAME]),
cvar_string(g_iCvars[CVAR_PASSWORD]),
cvar_string(g_iCvars[CVAR_DATABASE])
);

if((iConnect = SQL_Connect(iSql, iError, szError, charsmax(szError))) == Empty_Handle) {
set_fail_state(szError);
}

SQL_FreeHandle(iConnect);
}

public client_putinserver(id) {
new szSteamId[35], iClient[1], szQuery[512];
get_user_authid(id, szSteamId, charsmax(szSteamId));

iClient[0] = id;

formatex(szQuery, charsmax(szQuery), "SELECT * FROM `%s` WHERE (`%s`.`steam_id` = '%s')", szTable, szTable, szSteamId);
SQL_ThreadQuery(iSql, "SQL_Handler", szQuery, iClient, sizeof(iClient));
}

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];

if(SQL_NumResults(iQuery)) {
new szRegDate[32], szCurrent[32], iTime_1, iTime_2;
SQL_ReadResult(iQuery, SQL_FieldNameToNum(iQuery, "regdate"), szRegDate, charsmax(szRegDate));

get_time("%Y:%m:%d %H:%M:%S", szCurrent, charsmax(szCurrent));

iTime_1 = parse_time(szRegDate, "%Y:%m:%d %H:%M:%S");
iTime_2 = parse_time(szCurrent, "%Y:%m:%d %H:%M:%S");

client_print(0, print_chat, "%d %d %d", iTime_1, iTime_2, get_pcvar_num(g_iCvars[CVAR_TIME]));

if(iTime_1 + get_pcvar_num(g_iCvars[CVAR_TIME]) > iTime_2) {
if(get_pcvar_num(g_iCvars[CVAR_GIVE])) {
set_task(5.0, "task_info", TASK_INDEX_INFO + id);
}

set_user_flags(id, read_flags(cvar_string(g_iCvars[CVAR_FLAGS])));
}
}

return true;
}

public task_info(task) {
new id = task - TASK_INDEX_INFO;

client_print_color(id, print_team_default, "%L", id, "GCMS_FLAGS_GIVE_INFO");
remove_task(task);
}

stock cvar_string(iCvar) {
new szResult[128];
get_pcvar_string(iCvar, szResult, charsmax(szResult));

return szResult;
}
Сказали проблема с подключением к бд, можно решить ?
 

angrybot

Администратор
Модератор
Разработчик
Постоялец
Пользователь
Дизайнер
Регистрация
15 Дек 2019
Сообщения
166
Симпатии
60
Научитесь прикладывать весь лог файл, а не лишь ту часть, которая кажется вам верной.
 
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу