- Ошибка
-
L 01/21/2019 - 21:32:07: [AMXX] Displaying debug trace (plugin "crux_ansata.amxx", version "1.0")
L 01/21/2019 - 21:32:07: [AMXX] Run time error 4: index out of bounds
L 01/21/2019 - 21:32:07: [AMXX] [0] file_918.sma::eRoundStart (line 80)
L 01/21/2019 - 21:32:07: World triggered "Round_Start"
L 01/21/2019 - 21:34:08: Team "CT" triggered "Target_Saved" (CT "0") (T "0")
L 01/21/2019 - 21:34:08: World triggered "Round_End"
L 01/21/2019 - 21:34:13: [AMXX] Displaying debug trace (plugin "crux_ansata.amxx", version "1.0")
L 01/21/2019 - 21:34:13: [AMXX] Run time error 4: index out of bounds
L 01/21/2019 - 21:34:13: [AMXX] [0] file_918.sma::eRoundStart (line 80)
L 01/21/2019 - 21:34:13: World triggered "Round_Start"
- ОС
- Linux
- Amx Mod X
-
AMX Mod X 1.9.0.5232 (http://www.amxmodx.org)
Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: Oct 14 2018 08:47:55
Built from: https://github.com/alliedmodders/amxmodx/commit/be52641
Build ID: 5232:be52641
Core mode: JIT+ASM32
- Билд
-
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.4.0.668-dev
Build date: 09:47:42 Sep 29 2018 (1631)
Build from: https://github.com/dreamstalker/rehlds/commit/89be216
- ReGamedll
-
ReGameDLL version: 5.7.0.319-dev
Build date: 10:52:38 Dec 23 2018
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/9d89a34
- Версия 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
- Список метамодулей
-
Currently loaded plugins:
description stat pend file vers src load unload
[ 1] Reunion RUN - reunion.so v0.1.0.89 ini Start Never
[ 2] AMX Mod X RUN - amxmodx.so v1.9.0.5232 ini Start ANY
[ 3] VoiceTranscoder RUN - vtc.so v2017RC3 ini ANY ANY
[ 4] Rechecker RUN - rechecker.so v2.5 ini Chlvl ANY
[ 5] ReSemiclip RUN - resemiclip.so v2.3.9 ini Chlvl ANY
[ 6] ReSRDetector RUN - resrdetector.so v0.1.0 ini Chlvl ANY
[ 7] ReAPI RUN - reapi_amxx_i386.so v5.6.0.160-dev pl2 ANY Never
[ 8] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5232 pl2 ANY ANY
[ 9] Engine RUN - engine_amxx_i386.so v1.9.0.5232 pl2 ANY ANY
[10] MySQL RUN - mysql_amxx_i386.so v1.9.0.5232 pl2 ANY ANY
[11] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5219 pl2 ANY ANY
[12] CSX RUN - csx_amxx_i386.so v1.9.0.5219 pl2 ANY ANY
[13] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5232 pl2 ANY ANY
[14] Fun RUN - fun_amxx_i386.so v1.9.0.5232 pl2 ANY ANY
[15] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl2 ANY Never
15 p
- Список плагинов
-
не думаю что он тут нужен, проверял без плагинов ошибка аналогична
- Автор плагина
- DUKKHAZ0R
- Версия плагина
- 1.0
- Исходный код
-
/*
Плагин: Crux Ansata
Автор: DUKKHAZ0R | Сайт: http://aimbat.ru/plugins/
Описание:
Плагин добавляет на сервер талисман жизни, у человека имеющего его будет восстанавливаться 5 хп каждые 2 секунды.
В начале рануда рандомному игроку выпадает талисман жизни, если человек умирает, то любой другой сможет подобрать талисман.
Минимальное количество игроков для работы плагина, количество восстанавливаемого здоровья и интервал восстанавления можно настроить в исходнике.
*/
#include <amxmodx>
#include <engine>
#define SCREENFADE //Затемнять экран при регенерации здоровья
#define MIN_PLAYERS 1 //Минимальное кол-во игроков для работы плагина
#define ROUND_ACCESS 3 //С какого раунда доступен талисман
#define GIVE_HEALTH 5 //Кол-во выдаваемого здоровья
#define INTERVAL_REGENERATION 2.0 //Интервал между восстановлением
new const g_szModel[] = "models/crux_ansata.mdl";
new g_iPlayerId, g_iRoundCounter, szName[32];
#if defined SCREENFADE
new g_MsgScreenFade;
new Float:g_fTimeGlare[33];
#endif
public plugin_init()
{
register_plugin("Crux Ansata", "1.0", "DUKKHAZ0R");
register_touch("crux_ansata", "player", "fw_TouchEntity");
register_logevent("eRoundStart", 2, "1=Round_Start");
register_event("DeathMsg", "eDeathMsg", "a", "1>0");
register_event("TextMsg", "eRoundRestart", "a", "2&#Game_C", "2&#Game_w");
#if defined SCREENFADE
register_event("ScreenFade", "EventScreenFade", "b", "4=255", "5=255", "6=255");
g_MsgScreenFade = get_user_msgid("ScreenFade");
#endif
set_task(INTERVAL_REGENERATION, "RegenerationHealth", .flags="b");
}
#if defined SCREENFADE
public EventScreenFade(id)
g_fTimeGlare[id] = read_data(1) / 4096.0 + get_gametime();
#endif
public plugin_precache()
{
precache_model(g_szModel);
}
public client_disconnected(id)
{
if(g_iPlayerId == id)
SpawnAnsata(id);
}
public eRoundRestart()
g_iRoundCounter = 0;
public eRoundStart()
{
if(++g_iRoundCounter < ROUND_ACCESS || get_playersnum() < MIN_PLAYERS)
return;
static iEnt;
while((iEnt = find_ent_by_class(iEnt, "crux_ansata")))
remove_entity(iEnt);
static apPlayers[32], iPlayers;
get_players(apPlayers, iPlayers, "ach");
g_iPlayerId = apPlayers[random(iPlayers-1)];
get_user_name(g_iPlayerId, szName, charsmax(szName));
ChatColor(0, "^4[CA] ^3%s ^1выпал талисман жизни.", szName);
}
public eDeathMsg()
{
if(read_data(2) == g_iPlayerId)
SpawnAnsata(g_iPlayerId);
}
public fw_TouchEntity(iEnt, id)
{
if(!is_valid_ent(iEnt) || g_iPlayerId)
return 1;
entity_set_int(iEnt, EV_INT_flags, FL_KILLME);
get_user_name(g_iPlayerId = id, szName, charsmax(szName));
ChatColor(0,"^4[CA] ^3%s ^1поднял талисман жизни.",szName);
return 1;
}
public RegenerationHealth()
{
if(!g_iPlayerId || get_playersnum() < MIN_PLAYERS)
return;
static Float:fHealth, MsgId_Health; fHealth = entity_get_float(g_iPlayerId, EV_FL_health);
if(!MsgId_Health) MsgId_Health = get_user_msgid("Health");
if(fHealth < 100 && is_user_alive(g_iPlayerId))
{
static Float:giveHealth; giveHealth = (fHealth + GIVE_HEALTH) < 100 ? float(GIVE_HEALTH) : (100 - fHealth);
entity_set_float(g_iPlayerId, EV_FL_health, fHealth + giveHealth);
message_begin(MSG_ONE_UNRELIABLE, MsgId_Health, _, g_iPlayerId);
write_byte(floatround(fHealth + giveHealth));
message_end();
#if defined SCREENFADE
if (get_gametime() >= g_fTimeGlare[g_iPlayerId])
{
message_begin(MSG_ONE_UNRELIABLE, g_MsgScreenFade, _, g_iPlayerId)
write_short(1<<10); write_short(1<<10); write_short(0x0000); write_byte(0);
write_byte(255); write_byte(0); write_byte(40); message_end();
}
#endif
}
}
stock SpawnAnsata(id)
{
static Float:fOrigin[3];
entity_get_vector(id, EV_VEC_origin, fOrigin);
new iEnt = create_entity("info_target");
if(!is_valid_ent(iEnt))
return;
entity_set_vector(iEnt, EV_VEC_origin, fOrigin);
entity_set_string(iEnt, EV_SZ_classname, "crux_ansata");
entity_set_int(iEnt, EV_INT_solid, SOLID_TRIGGER);
entity_set_int(iEnt, EV_INT_movetype, MOVETYPE_NONE);
entity_set_int(iEnt, EV_INT_effects, 8);
entity_set_model(iEnt, g_szModel);
entity_set_size(iEnt, Float:{-16.0,-16.0,-16.0}, Float:{16.0,16.0,16.0});
ChatColor(g_iPlayerId = 0, "^4[CA] ^3%s ^1потерял талисман жизни.", szName);
}
stock ChatColor(const id, const szMessage[], any:...)
{
static szBuffer[191], apPlayers[32], iPlayers; iPlayers = 1;
vformat(szBuffer, charsmax(szBuffer), szMessage, 3);
if(id)
{
if(!is_user_connected(id)) return;
apPlayers[0] = id;
iPlayers = 1;
}
else get_players(apPlayers, iPlayers, "ch");
for(new i;i < iPlayers; i++)
{
message_begin(MSG_ONE_UNRELIABLE, 76, .player = apPlayers[i]);
write_byte(apPlayers[i]);
write_string(szBuffer);
message_end();
}
}
.
В этой теме было размещено решение! Перейти к решению.