- Ошибка
-
L 02/20/2022 - 19:23:08: [AMXX] Displaying debug trace (plugin "top_awards.amxx", version "1.0")
L 02/20/2022 - 19:23:08: Ошибка плагина 4: index out of bounds
L 02/20/2022 - 19:23:08: [AMXX] [0] top_awards.sma::client_give_awards (line 118)
- ОС
- Linux
- Amx Mod X
-
AMX Mod X 1.9.0-dev+5210 (http://www.amxmodx.org)
- Билд
-
ReHLDS version: 3.11.0.767-dev
- ReGamedll
-
ReGameDLL version: 5.21.0.540-dev
- Версия Metamod
-
Metamod-r v1.3.78, API (5:13)
- Список метамодулей
-
[ 1] SafeNameAndChat RUN - SafeNameAndChat. v1.1 ini ANY ANY
[ 2] Rechecker RUN - rechecker_mm_i38 v2.7 ini Chlvl ANY
[ 3] AMX Mod X RUN - amxmodx_mm_i386. v1.9.0-d ini Start ANY
[ 4] Reunion RUN - reunion_mm_i386. v0.1.92d ini Start Never
[ 5] WHBlocker RUN - whblocker_mm_i38 v1.5.696 ini Chlvl ANY
[ 6] Revoice RUN - revoice_mm_i386. v0.1.0.3 ini Start Never
[ 7] ReAuthCheck RUN - reauthcheck_mm_i v0.1.6 ini Start Never
[ 8] ReSRDetector RUN - resrdetector_mm_ v0.1.0 ini Chlvl ANY
[ 9] ReSemiclip RUN - resemiclip_mm_i3 v2.3.9 ini Chlvl ANY
[10] Ultimate Unprec RUN - ultimate_unpreca vBeta 2. ini Chlvl Chlvl
[11] MySQL RUN - mysql_amxx_i386. v1.9.0-d pl3 ANY ANY
[12] Admins Kit RUN - adminskit_amxx_i v2.1.0 pl3 ANY ANY
[13] ReAPI RUN - reapi_amxx_i386. v5.21.0. pl3 ANY Never
[14] Engine RUN - engine_amxx_i386 v1.9.0-d pl3 ANY ANY
[15] FakeMeta RUN - fakemeta_amxx_i3 v1.9.0-d pl3 ANY ANY
[16] Ham Sandwich RUN - hamsandwich_amxx v1.9.0-d pl3 ANY ANY
[17] ReAimDetector RUN - reaimdetector_am v0.2.2 pl3 ANY Never
[18] CStrike RUN - cstrike_amxx_i38 v1.9.0-d pl3 ANY ANY
[19] CSX RUN - csx_amxx_i386.so v1.9.0-d pl3 ANY ANY
[20] Fun RUN - fun_amxx_i386.so v1.9.0-d pl3 ANY ANY
[21] SxGeo RUN - sxgeo_amxx_i386. v2.2 pl3 ANY Never
21 plugins, 21 running
- Список плагинов
-
[ 1] [190] Ultimate Gag 21.01.02BE SKAJIbnEJIb ultimate_gag.am running
[ 2] Top Awards 1.0 Dom1no_[KZ] top_awards.amxx debug
[ 3] [ReAPI] Parachute 1.1 ReHLDS Team & me parachute_lite. debug
[ 4] FreshBans 1.4.6b kanagava fresh_bans_146- running
[ 5] Mode 2x2 2.5re s1lent mode.amxx running
[ 6] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 7] ScreenMaker 1.1 neygomon screen_maker.am running
[ 8] Admin Base 1.9.0-dev+ AMXX Dev Team admin.amxx running
[ 9] Admin Commands 1.9.0-dev+ AMXX Dev Team admincmd.amxx running
[ 10] Slots Reservation 1.9.0-dev+ AMXX Dev Team adminslots.amxx running
[ 11] Map Manager 2.5.61 Mistrick mapmanager.amxx running
[ 12] Commands Menu 1.9.0-dev+ AMXX Dev Team cmdmenu.amxx running
[ 13] Players Menu 1.7 neugomon players_menu.am running
[ 14] Maps Menu 1.4.1 neugomon mapsmenu.amxx running
[ 15] Plugin Menu 1.9.0-dev+ AMXX Dev Team pluginmenu.amxx running
[ 16] Admin Chat 1.9.0-dev+ AMXX Dev Team adminchat.amxx running
[ 17] Anti Flood 1.9.0-dev+ AMXX Dev Team antiflood.amxx running
[ 18] Scrolling Message 1.9.0-dev+ AMXX Dev Team scrollmsg.amxx running
[ 19] Info. Messages 1.9.0-dev+ AMXX Dev Team imessage.amxx running
[ 20] Admin Votes 1.9.0-dev+ AMXX Dev Team adminvote.amxx running
[ 21] Pause Plugins 1.9.0-dev+ AMXX Dev Team pausecfg.amxx running
[ 22] Stats Configuration 1.9.0-dev+ AMXX Dev Team statscfg.amxx running
[ 23] Restrict Weapons 1.9.0-dev+ AMXX Dev Team restmenu.amxx running
[ 24] Rank Menu 1.1 h1k3 rankmenu.amxx running
[ 25] CSStatsX SQL 0.7.4+2 serfreeman1337 csstatsx_sql.am running
[ 26] AES: StatsX 0.5.9 [REA serfreeman1337/s aes_statsx_cstr running
[ 27] ResetScore 1.0 Leo_[BH] Resetscore.amxx running
[ 28] Damager 0.0.5 steelzzz damager.amxx running
[ 29] Team menu 1.1 NobodyInTeam teammenu.amxx running
[ 30] Custom Models 1.3.2 neugomon custom_models.a running
[ 31] [ReAPI] Random Weapons 2.4.9 neugomon/h1k3 random_weapons_ running
[ 32] Vote Knife or Default 0.0.1 brody vote_knife_or_d running
[ 33] Say me and Say hp 1.4 neygomon sayme.amxx running
[ 34] Advanced Kill Assists 1.3c Xelson next21_kill_ass running
[ 35] [ReAPI] No Team Flash 0.0.3 Vaqtincha no_team_flash.a running
[ 36] Multiple Game Names 1.0 mforce gamenamechange. running
[ 37] Connect Info 1.0 Hypa_[KZ] connect_info.am running
[ 38] [190] Block Reconnect 20.06.06 ShaTalKiN Block_Reconnect running
[ 39] Block Pickup Gold 0.1 Vaqtincha BlockPickupGold running
[ 40] Block grande info 1.0 neygomon BlockGrenadeInf running
[ 41] Demo Recorder 2.4.1 F@nt0M demo_recorder.a running
[ 42] Lite VoteBan 1.4 neygomon lite_voteban.am running
[ 43] AFK Control ReNew 1.2(a) neygomon afk_control.amx running
[ 44] Sound CSO 1.2 TBONTB Sound_CSO.amxx running
[ 45] Block Radio Commands 1.0 d3m37r4 block_radiocmd. running
[ 46] BOMB REAL TIMER 2.0 Vaqtincha | Flym bomb_real_timer running
[ 47] [190] Snipers RBS 20.06.06 SKAJIbnEJIb snipers_rbs.amx running
[ 48] [ReAPI] Best player of 1.1.2 F@nt0M best_player_of_ running
[ 49] [ReAPI] Healthnade 0.0.3f F@nt0M + mx?! reapi_healthnad running
[ 50] Killer ScreenFade 0.0.5 Vaqtincha reapi_killer_sc running
[ 51] Frags Counter 1.0 CHEL74 frags_counter.a running
[ 52] [190] Ultimate Flags 21.03.24BE SKAJIbnEJIb ultimate_flags. running
[ 53] Adverts 1.0 pUzzlik adverts_message running
[ 54] Spec Money Save 0.2 F@nt0M spec_money_save running
[ 55] SF Bets 0.1.5 serfreeman1337 sf_bets.amxx running
[ 56] Top Bomber 0.1.1 Albertio top_bomber.amxx running
[ 57] CT Bomb Cracker 0.5 Vaqtincha ct_bomb_cracker running
[ 58] Ping Checker 26.0.1 RC1 h1k3 ping_checker.am running
[ 59] Block Voice 1x1 1.0.2 Ragamafona block_voice_1x1 running
[ 60] Team Balance Control 1.3.9 gyxoBka TeamBalanceCont running
[ 61] Server Menu 1.5.0 F@nt0M server_menu.amx running
[ 62] Lite Translit 2.8 neygomon lite_translit_c debug
[ 63] Advanced Experience Sy 0.5.9 [REA serfreeman1337/s aes_main.amxx running
[ 64] Accuracy Fix 3.0 Numb accuracy_fix.am running
[ 65] AES: CStrike Addon 0.5.9 [REA serfreeman1337/s aes_exp_cstrike running
[ 66] AES: Informer 0.5.9 [REA serfreeman1337/s aes_informer_sx debug
[ 67] AES: Admin Tools 0.5.9 [REA serfreeman1337/s aes_exp_editor. running
[ 68] AES: Bonus System 0.5.9 Vega serfreeman1337/s aes_bonus_syste running
[ 69] AES: Bonus CSTRIKE 0.5.9.1 [R serfreeman1337/s aes_bonus_cstri running
[ 70] Fake Map 0.3 Vaqtincha FakeMap.amxx running
[ 71] V.I.P Custom Weapons 1.0.0 Vaqtincha vip_custom.amxx debug
[ 72] V.I.P Custom KNIFE 1.0.0 Vaqtincha custom_knife.am running
[ 73] V.I.P Custom DEAGLE 1.0.0 Vaqtincha custom_deagle.a running
[ 74] V.I.P Custom M4A1 1.0.0 Vaqtincha custom_m4a1.amx running
[ 75] V.I.P Custom AK-47 1.0.0 Vaqtincha custom_ak47.amx running
[ 76] V.I.P Custom AWP 1.0.0 Vaqtincha custom_awp.amxx running
[ 77] GunGame 03.01.12 FIX refiil.amxx running
77 plugins, 77 running
- Автор плагина
- Dom1no_[KZ]
- Версия плагина
- 1.0
- Исходный код
-
#include <amxmodx>
#if AMXX_VERSION_NUM < 183
#include <colorchat>
#endif
#define PLUGIN "Top Awards"
#define VERSION "1.0"
#define AUTHOR "Dom1no_[KZ]"
/* Настройки */
//#define IGNORE_FLAGS (ADMIN_MENU|ADMIN_LEVEL_H)
// Игнорируемые флаги
// Закоментируйте если не требуется
#define STATS_SYSTEM 2 // Система записи статистики
// 0 - CSX
// 1 - CsStats MySQL by SKAJIbnEJIb
// 2 - CsStatsX SQL by serfreeman1337
#define MAX_AWARDS 256
// Максимальная количество наград
const Float: TIME = 5.0;
// Задержка в секундах перед проверкой игрока
enum _:DATA {
FLAGS[32],
MSG[128]
};
new g_arrAwardData[MAX_AWARDS][DATA], g_iDataSize = 1;
#if STATS_SYSTEM == 0
#include <csx>
#define get_player_stats get_user_stats
#endif
#if STATS_SYSTEM == 1
#include <csstats_mysql>
#endif
#if STATS_SYSTEM == 2
#include <csstatsx_sql>
#define get_player_stats get_user_stats_sql
#endif
public plugin_init(){
register_plugin(PLUGIN, VERSION, AUTHOR);
}
public plugin_cfg(){
new szPath[64];
get_localinfo("amxx_configsdir", szPath, charsmax(szPath));
add(szPath, charsmax(szPath), "/top_awards.ini");
new iFile = fopen(szPath, "rt");
if(!iFile){
new szError[96];
formatex(szError, charsmax(szError), "File '%s' not found OR incorrect CHMOD!", szPath);
set_fail_state(szError);
}
new szBuffer[MAX_AWARDS];
while(!feof(iFile)){
fgets(iFile, szBuffer, charsmax(szBuffer));
trim(szBuffer);
if(!szBuffer[0] || szBuffer[0] == ';')
continue;
if(parse(szBuffer,
g_arrAwardData[g_iDataSize][FLAGS], charsmax(g_arrAwardData[][FLAGS]),
g_arrAwardData[g_iDataSize][MSG], charsmax(g_arrAwardData[][MSG])
) == 2) g_iDataSize++;
}
fclose(iFile);
}
public client_putinserver(id){
set_task(TIME, "client_give_awards", id);
}
public client_give_awards(id){
new g_iAccess, szName[32];
g_iAccess = get_user_flags(id);
get_user_name(id, szName, charsmax(szName));
if(!is_user_connected(id)){
return;
}
#if defined IGNORE_FLAGS
if(g_iAccess & IGNORE_FLAGS){
return;
}
#endif
#if STATS_SYSTEM == 0 || STATS_SYSTEM == 2
new szStats[8];
new iRank = get_player_stats(id, szStats, szStats);
#else
new szStats[22];
new iRank = csstats_get_user_stats(id, szStats);
#endif
if(iRank <= g_iDataSize){
set_user_flags(id, g_iAccess | read_flags(g_arrAwardData[iRank][FLAGS]));
replace_all(g_arrAwardData[iRank][MSG], charsmax(g_arrAwardData[][MSG]), "!n", "^1");
replace_all(g_arrAwardData[iRank][MSG], charsmax(g_arrAwardData[][MSG]), "!t", "^3");
replace_all(g_arrAwardData[iRank][MSG], charsmax(g_arrAwardData[][MSG]), "!g", "^4");
replace_all(g_arrAwardData[iRank][MSG], charsmax(g_arrAwardData[][MSG]), "%name%", szName);
client_print_color(id, print_team_default, "%s", g_arrAwardData[iRank][MSG]);
}
else{
remove_user_flags(id, g_arrAwardData[iRank][FLAGS]);
}
}
Ошибка в этой строке :
remove_user_flags(id, g_arrAwardData[iRank][FLAGS]);
Я так понимаю эта функция удаляет у игрока флаги если они у него есть, и выдает, те которые прописаны в top_awards.ini за топ.
Вопрос есть ли смысл в этой функции в этом плагине? Или просто её удалить и ошибка пропадет ?
remove_user_flags(id, g_arrAwardData[iRank][FLAGS]);
Я так понимаю эта функция удаляет у игрока флаги если они у него есть, и выдает, те которые прописаны в top_awards.ini за топ.
Вопрос есть ли смысл в этой функции в этом плагине? Или просто её удалить и ошибка пропадет ?
В этой теме было размещено решение! Перейти к решению.