Участник
Пользователь
- Сообщения
- 46
- Реакции
- 5
- Ошибка
-
L 05/09/2019 - 09:07:13: Start of error session.
L 05/09/2019 - 09:07:13: Info (map "fy_snow") (file "addons/amxmodx/logs/error_20190509.log")
L 05/09/2019 - 09:07:13: [AMXX] Displaying debug trace (plugin "top_awards.amxx", version "1.0")
L 05/09/2019 - 09:07:13: [AMXX] Run time error 4: index out of bounds
L 05/09/2019 - 09:07:13: [AMXX] [0] top_awards.sma::client_give_awards (line 118)
L 05/09/2019 - 09:07:21: [AMXX] Displaying debug trace (plugin "top_awards.amxx", version "1.0")
L 05/09/2019 - 09:07:21: [AMXX] Run time error 4: index out of bounds
L 05/09/2019 - 09:07:21: [AMXX] [0] top_awards.sma::client_give_awards (line 118)
- ОС
- Linux
- Amx Mod X
-
1.8.3-Re
- Билд
-
hiden
- ReGamedll
-
hiden
- Версия Metamod
-
1.3.0.116
- Список метамодулей
-
[ 1] Reunion, v0.1.0.92, 2018-02-11, by The Legion, see
[ 2] AMX Mod X, v1.8.3-Re, Dec 24 2016, by AMX Mod X Dev Team, see http://www.amxmodx.org
[ 3] VoiceTranscoder, v2017RC3, 2017.02.12, by WPMG.PRoSToC0der, see http://vtc.wpmg.ru/
[ 4] ReSemiclip, v2.3.9, 13/02/17, by s1lent & Adidasman, see http://www.dedicated-server.ru/
[ 5] WHBlocker, v1.5.695, 2017-12-13, by s1lent, see http://www.aghl.ru/
[ 6] Rechecker, v2.5, Oct 21 2017, by s1lent, see http://www.dedicated-server.ru/
[ 7] MySQL, v1.8.3-Re, Oct 11 2016, by AMX Mod X Dev Team, see http://www.amxmodx.org/
[ 8] SQLite, v1.8.3-Re, Oct 11 2016, by AMX Mod X Dev Team, see http://www.amxmodx.org/
[ 9] CStrike, v1.8.3-Re, Dec 24 2016, by AMX Mod X Dev Team, see http://www.amxmodx.org
[ 10] CSX, v1.8.3-Re, Dec 24 2016, by AMX Mod X Dev Team, see http://www.amxmodx.org/
[ 11] Engine, v1.8.3-Re, Dec 24 2016, by AMX Mod X Dev Team, see http://www.amxmodx.org
[ 12] FakeMeta, v1.8.3-Re, Dec 24 2016, by AMX Mod X Dev Team, see http://www.amxmodx.org
[ 13] Fun, v1.8.3-Re, Dec 24 2016, by AMX Mod X Dev Team, see http://www.amxmodx.org
[ 14] GeoIP, v1.8.3-Re, Oct 11 2016, by AMX Mod X Dev Team, see http://www.amxmodx.org/
[ 15] hackdetector, v0.15.328.lite, 2016-12-17, by AGHL.RU Dev Team, see http://www.aghl.ru/
[ 16] Ham Sandwich, v1.8.3-Re, Dec 24 2016, by AMX Mod X Dev Team, see http://www.amxmodx.org
[ 17] ReAimDetector, v0.2.2, 2018-02-06, by ReHLDS Team, see http://www.dedicated-server.ru/
[ 18] ReAPI, v5.8.0.166-dev, 2019-04-14, by Asmodai & s1lent, see https://github.c
- Список плагинов
-
;/////////////////////////////////////////////////////////////////////////////////
;//////////////////////////////////// PLUGINS
;/////////////////////////////////////////////////////////////////////////////////
- Автор плагина
- Dom1no_[KZ]
- Версия плагина
- "1.0"
- Исходный код
-
/*
Copyright by Dom1no_[KZ]
2019 © https://vk.com/m.kent03
*/
#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_CHAT|ADMIN_KICK)
// Игнорируемые флаги
// Закоментируйте если не требуется
#define STATS_SYSTEM 0 // Система записи статистики
// 0 - CSX
// 1 - CsStats MySQL by SKAJIbnEJIb
// 2 - CsStatsX SQL by serfreeman1337
#define MAX_AWARDS 256
// Максимальная количество наград
const Float: TIME = 3.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]);
}
}
Please help with this error