acs_injection.amxx логи с ошибками

Сообщения
11
Реакции
0
Ошибка
L 10/22/2024 - 14:52:18: Start of error session.
L 10/22/2024 - 14:52:18: Info (map "de_factor") (file "addons/amxmodx/logs/error_20241022.log")
L 10/22/2024 - 14:52:18: [ReAPI] rg_switch_weapon: Invalid entity weapon
L 10/22/2024 - 14:52:18: [AMXX] Run time error 10 (plugin "acs_injection.amxx") (native "rg_switch_weapon") - debug not enabled!
L 10/22/2024 - 14:52:18: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 10/22/2024 - 17:54:55: Start of error session.
L 10/22/2024 - 17:54:55: Info (map "de_mirage") (file "addons/amxmodx/logs/error_20241022.log")
L 10/22/2024 - 17:54:55: [ReAPI] rg_switch_weapon: Invalid entity weapon
L 10/22/2024 - 17:54:55: [AMXX] Run time error 10 (plugin "acs_injection.amxx") (native "rg_switch_weapon") - debug not enabled!
L 10/22/2024 - 17:54:55: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 10/22/2024 - 17:54:56: [ReAPI] rg_switch_weapon: Invalid entity weapon
L 10/22/2024 - 17:54:56: [AMXX] Run time error 10 (plugin "acs_injection.amxx") (native "rg_switch_weapon") - debug not enabled!
L 10/22/2024 - 17:54:56: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 10/22/2024 - 18:16:15: Start of error session.
L 10/22/2024 - 18:16:15: Info (map "css_cache") (file "addons/amxmodx/logs/error_20241022.log")
L 10/22/2024 - 18:16:15: [ReAPI] rg_switch_weapon: Invalid entity weapon
L 10/22/2024 - 18:16:15: [AMXX] Run time error 10 (plugin "acs_injection.amxx") (native "rg_switch_weapon") - debug not enabled!
L 10/22/2024 - 18:16:15: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 10/22/2024 - 19:41:23: Start of error session.
L 10/22/2024 - 19:41:23: Info (map "de_avangard") (file "addons/amxmodx/logs/error_20241022.log")
L 10/22/2024 - 19:41:23: [ReAPI] rg_switch_weapon: Invalid entity weapon
L 10/22/2024 - 19:41:23: [AMXX] Run time error 10 (plugin "acs_injection.amxx") (native "rg_switch_weapon") - debug not enabled!
L 10/22/2024 - 19:41:23: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 10/22/2024 - 19:41:59: [ReAPI] rg_switch_weapon: Invalid entity weapon
L 10/22/2024 - 19:41:59: [AMXX] Run time error 10 (plugin "acs_injection.amxx") (native "rg_switch_weapon") - debug not enabled!
L 10/22/2024 - 19:41:59: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 10/22/2024 - 19:42:00: [ReAPI] rg_switch_weapon: Invalid entity weapon
L 10/22/2024 - 19:42:00: [AMXX] Run time error 10 (plugin "acs_injection.amxx") (native "rg_switch_weapon") - debug not enabled!
L 10/22/2024 - 19:42:00: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
ОС
Linux
Amx Mod X
AMX Mod X 1.9.0.5263 (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 27 2019 16:23:31
Built from: https://github.com/alliedmodders/amxmodx/commit/15a14a0
Build ID: 5263:15a14a0
Core mode: JIT+ASM32
Билд
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.14.0.837-dev
Build date: 14:52:26 Aug 01 2024 (3764)
Build from: https://github.com/dreamstalker/rehlds/commit/2834fb8
ReGamedll
ReGameDLL version: 5.21.0.556-dev
Build date: 08:43:58 Jul 22 2022
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/1081301
Версия Metamod
Metamod v1.21p37  2013/05/30 (5:13)
by Will Day
http://www.metamod.org/
Patch: Metamod-P (mm-p) v37
by Jussi Kivilinna
http://metamod-p.sourceforge.net/
compiled: May 30 2013, 11:41:16 EET (optimized)
Список метамодулей
description      stat pend  file              vers      src   load  unlod
[ 1] Reunion RUN - reunion_mm_i386. v0.1.0.1 ini Start Never
[ 2] VoiceTranscoder RUN - VoiceTranscoder. v2017RC5 ini ANY ANY
[ 3] AMX Mod X RUN - amxmodx_mm_i386. v1.9.0.5 ini Start ANY
[ 4] Rechecker RUN - rechecker_mm_i38 v2.5 ini Chlvl ANY
[ 5] ReSemiclip RUN - resemiclip_mm_i3 v2.3.9 ini Chlvl ANY
[ 6] WHBlocker RUN - whblocker_mm_i38 v1.5.697 ini Chlvl ANY
[ 7] Ultimate Unprec RUN - unprecacher_i386 vBeta 2. ini Chlvl Chlvl
[ 8] CStrike RUN - cstrike_amxx_i38 v1.9.0.5 pl3 ANY ANY
[ 9] CSX RUN - csx_amxx_i386.so v1.9.0.5 pl3 ANY ANY
[10] ReAPI RUN - reapi_amxx_i386. v5.22.0. pl3 ANY Never
[11] SxGeo RUN - sxgeo_amxx_i386. v2.2 pl3 ANY Never
[12] MySQL RUN - mysql_amxx_i386. v1.9.0.5 pl3 ANY ANY
[13] CURL AMXX RUN - curl_amxx_i386.s v1.1.1 pl3 ANY ANY
[14] FakeMeta RUN - fakemeta_amxx_i3 v1.9.0.5 pl3 ANY ANY
[15] Engine RUN - engine_amxx_i386 v1.9.0.5 pl3 ANY ANY
[16] Ham Sandwich RUN - hamsandwich_amxx v1.9.0.5 pl3 ANY ANY
[17] Fun RUN - fun_amxx_i386.so v1.9.0.5 pl3 ANY ANY
[18] C4 Control RUN - c4_control_amxx_ v1.0.2 pl3 ANY ANY
[19] AuthEmu RUN - authemu_amxx_i38 v5.2.12. pl3 ANY Never
19 plugins, 19 running
Список плагинов
[  1] GameCMS_API             5.6.2       zhorzh78          gamecms_api.amx  running  
[ 2] FreshBans 1.3.4 kanagava fresh_bans.amxx running
[ 3] AIM detector 0.9.4.1b kanagava aim_detector.am running
[ 4] GameCMS GameScore 1.0 OverGame score.amxx running
[ 5] GameCMS_GagManager 2.2.7 ReAp zhorzh78 gamecms_gagmana running
[ 6] Time for info 1.0 neugomon time_for_info.a running
[ 7] [190] CsStats Editor 20.06.06 SKAJIbnEJIb csstats_editor. running
[ 8] [182] Cvar On Map 20.06.06 SKAJIbnEJIb cvar_on_map.amx running
[ 9] Weapon Model Keys 0.1.1 Albertio weapon_model_ke running
[ 10] GameCMS Stats Pigs 1.0 OverGame gamecms_stats_p running
[ 11] [190] Ultimate Flags 22.11.15 SKAJIbnEJIb ultimate_flags. running
[ 12] Only Dust2 1.0 Storm night_dust2.amx running
[ 13] Trial Access 1.1.0 mx?! | Radius Ed trial_access.am running
[ 14] Simple Online Logger 23.05.19 mx?! simple_online_l running
[ 15] C4 Control 1.3.2 Radius c4_control.amxx running
[ 16] [190] Whois RBS 22.11.15 SKAJIbnEJIb whois_rbs.amxx running
[ 17] Web Chat 1.3.11 BaHeK webchat.amxx running
[ 18] unknown unknown unknown prefix_loader.a running
[ 19] [190] MapChooser RBS 20.08.02 SKAJIbnEJIb & UF mapchooser_rbs. running
[ 20] [190] Ultimate Weapons 22.11.15 SKAJIbnEJIb ultimate_weapon running
[ 21] [190] Army Ranks Ultim 20.06.06 SKAJIbnEJIb army_ranks_ulti running
[ 22] [190] Skill ELO 22.11.15 SKAJIbnEJIb skill_elo.amxx running
[ 23] [190] VIP RBS 20.07.20 SKAJIbnEJIb vip_rbs.amxx running
[ 24] [190] Blind RBS 20.06.06 SKAJIbnEJIb blind_rbs.amxx running
[ 25] [190] CsStats MySQL 22.11.15 SKAJIbnEJIb csstats_mysql.a running
[ 26] [190] Stats Configurat 20.06.06 SKAJIbnEJIb & AM statscfg_rbs.am running
[ 27] [190] StatsX RBS 21.03.23 SKAJIbnEJIb & AM statsx_rbs.amxx running
[ 28] Advert Messages 1.5.5 Radius advert_messages running
[ 29] [190] Ultimate Informe 21.03.23 SKAJIbnEJIb ultimate_inform running
[ 30] [190] Kill Assist RBS 20.06.06 SKAJIbnEJIb & Di killassist_rbs. running
[ 31] [190] Chat RBS 20.06.06 SKAJIbnEJIb chat_rbs.amxx running
[ 32] [190] AfkKicker RBS 22.11.15 SKAJIbnEJIb afkkicker_rbs.a running
[ 33] [190] Snipers RBS 20.06.06 SKAJIbnEJIb snipers_rbs.amx running
[ 34] [190] SlayLosers RBS 20.06.06 SKAJIbnEJIb & d3 slaylosers_rbs. running
[ 35] [182] Map Spawns Edito 20.06.06 SKAJIbnEJIb & iG MapSpawnsEditor running
[ 36] [190] Block Reconnect 20.06.06 ShaTalKiN Block_Reconnect running
[ 37] Menus Front-End 20.06.06 SKAJIbnEJIb & AM amxmodmenu_rbs. running
[ 38] [190] AdminChat RBS 20.06.06 SKAJIbnEJIb adminchat_rbs.a running
[ 39] New Kick Menu 1.4.2 Radius newkickmenu.amx running
[ 40] [190] AdminCmd RBS 22.11.15 SKAJIbnEJIb & AM admincmd_rbs.am running
[ 41] [190] WallHack Viewer 20.06.06 SKAJIbnEJIb wallhack_viewer running
[ 42] Plugins Core 1.5.1 Radius plugins_core.am running
[ 43] [ReAPI] No Team Flash 0.0.3 Vaqtincha no_team_flash.a running
[ 44] [GCMS] Coins System 0.1 V1adJkee coins_system.am running
[ 45] [190] Screen Player 20.06.06 SKAJIbnEJIb screen_player.a running
[ 46] High Ping Kicker (WON) 0.16.2 OLO/shadow high_ping_kicke running
[ 47] Maps Menu 1.9.0.5263 AMXX Dev Team mapsmenu.amxx running
[ 48] Commands Menu 1.9.0.5263 AMXX Dev Team cmdmenu.amxx running
[ 49] [190] RestMenu RBS 20.06.06 SKAJIbnEJIb & AM restmenu_rbs.am running
[ 50] Reset Score 1.0 M1 TEAM ResetScore.amxx running
[ 51] Parachute 1.0 Mini1 parachute.amxx running
[ 52] Player Model Keys 0.1.3 Albertio player_model_ke running
[ 53] Admin ESP Mini 1.5 KoST admin_esp_mini. running
[ 54] [190] DemoRecorder RBS 20.06.06 SKAJIbnEJIb demorecorder_rb running
[ 55] Team Control 1.6.8 Radius team_control.am running
[ 56] CSO Kill Sounds 1.0.7 Radius (based on cso_kill_sounds running
[ 57] Nice Killer 1.6 Got Milk? / HoHo nice_killer.amx running
[ 58] Block 'Fire in the hol 0.1 Safety1st block_fire_in_t running
[ 59] [AR] [B.C.N.L.] API 1.0 Leo_[BH] ar_bcnl_api.amx running
[ 60] [AR] [B.C.N.L.] Bonus 1.0 Leo_[BH] ar_bcnl_bonus.a running
[ 61] [AR] [B.C.N.L.] 1 1.0 Leo_[BH] ar_bcnl1.amxx running
[ 62] [AR] [B.C.N.L.] Menu 1.0 Leo_[BH] ar_menu.amxx running
[ 63] Custom Smoke 1.09 bionext custom_smoke.am running
[ 64] grenades2xHE 1.0 Storm cgrenades2xHE.a running
[ 65] Multiple Game Names 1.0 mforce Multiple_Game_N running
[ 66] recoil_manager 1.0.0 fl0wer recoil_manager. running
[ 67] [ReAPI] Healthnade 0.0.9f DEV-CS.RU Commun reapi_healthnad running
[ 68] Molotov Cocktail API 2.8 CHEL74 + mx?! molotov_cocktai running
[ 69] Molotov Cocktail Spawn 1.1 mx?! molotov_cocktai running
[ 70] Day's Uniques 1.0.0 fl0wer days_uniques.am running
[ 71] Flag by Hash 1.0 mx?! flag_by_hash.am running
[ 72] [190] Warmup RBS 21.03.23 SKAJIbnEJIb warmup_rbs.amxx running
[ 73] Damager Advanced 1.2.0 Radius (based on damager_advance running
[ 74] Bomb Taker 0.0.2b Vaqtincha bomb_taker.amxx running
[ 75] Gren Kill Sound 1.0 Kill gren_kill_sound running
[ 76] Knife kill 1.0.1 MurLemur knife_kill_soun running
[ 77] [190] C4 Destroyer 21.03.23 SKAJIbnEJIb c4_destroyer.am running
[ 78] [All mod] Grab 2.1 Ian Cammarata / all_mod_grab_2. running
[ 79] Game Namer 1.3 NeuroToxin gamenamechanger running
[ 80] Knives System 17.08.2023 Oli knives_system.a running
[ 81] HolyGrenade Give 02.06.2024 Oli holygrenade_giv running
[ 82] HolyGrenade: Core 1.0 CHEL74 holygrenade_cor running
[ 83] ACS injection med-kit 1.0.6.2 DEV-CS.RU acs_injection.a running
[ 84] Revive Teammates: Core 1.1.0 ufame & Albertio rt_core.amxx running
[ 85] Revive Teammates: Plan 1.1.0 ufame & Albertio rt_planting.amx running
[ 86] Revive Teammates: Rest 1.1.0 ufame & Albertio rt_restrictions running
[ 87] Revive Teammates: Time 1.1.0 ufame & Albertio rt_timer.amxx running
[ 88] Revive Teammates: Effe 1.1.0 ufame & Albertio rt_effects.amxx running
[ 89] Revive Teammates: Soun 1.1.0 ufame & Albertio rt_sounds.amxx running
[ 90] Revive Teammates: Bonu 1.1.0 ufame & Albertio rt_bonus.amxx running
[ 91] WalkGuard 1.3.2 mogel walkguard_free. running
[ 92] Mode 2x2 2.5re s1lent mode.amxx running
92 plugins, 92 running
Автор плагина
https://dev-cs.ru/members/10396/
Версия плагина
ACS injection med-kit 1.0.6.2 DEV-CS.RU
Исходный код
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <hamsandwich>
#include <reapi>

#define ACS_INJ_SOUND_NOTIFY "buttons/bell1.wav"
#define ACS_INJ_SOUND_REJECT "buttons/button2.wav"
#define is_valid_player(%0) bool:is_user_connected(%0)
#define FFADE_IN 0x0000 // Just here so we don't pass 0 into the function
#define FFADE_OUT 0x0001 // Fade out (not in)
#define FFADE_MODULATE 0x0002 // Modulate (don't blend)
#define FFADE_STAYOUT 0x0004 // ignores the duration, stays faded out until new ScreenFade message received

static Float:gf_cure_time[MAX_PLAYERS + 1];
static gi_cure_speed[MAX_PLAYERS + 1];

enum _:ACS_STOP_THROTTLING {
bool:FLAG,
Float:LAST_USAGE
}; new ACS_PRINT_THR[MAX_PLAYERS + 1][ACS_STOP_THROTTLING];

enum _:CVARS {
PREFIX[64], ACCESS[32], COMMANDS[512], SPAWN_BONUS_COUNT, SPAWN_BONUS_STEAM_COUNT, USE_METHOD, SPEED, SPEED_DYNAMIC, BLOCK, Float:NEXT_ATTACK,
HEALTH, MAX_TIMES, MAX_COUNT, SEQUENCE, COST, BAR, VIP, DIFF, DIFF_MODE, KILL, V_MODEL[MAX_RESOURCE_PATH_LENGTH], P_MODEL[MAX_RESOURCE_PATH_LENGTH],
PRE_SAMPLE[MAX_RESOURCE_PATH_LENGTH], SAMPLE[MAX_RESOURCE_PATH_LENGTH], CHEAT, ENABLE, SPAWN, AES_BUY_COUNT, CMD_COUNT, NOTIFY_MODE, NOTIFY_SOUND_MODE
}; new CVAR[CVARS];

enum _:INJECT_DATA {
USED, COUNT, bool:IS_STEAM, Float:REMAINS_INJECT, bool:IS_INJECT, WEAPON
}; new acs_injections[MAX_PLAYERS + 1][INJECT_DATA];

#define ACS_INJ_SOUND_MASK (~30) // Какие сообщения выводить без звукового сопровождения и контроля троттлинга
enum _:NOTIFY_MODE {
INJ_SHOW_GET = 1, // Сопровождается звуком NOTIFY (сообщение с уведомлением о способе использования шпирца)
INJ_SHOW_TOTAL = 2, // Без звука
INJ_SHOW_LEFT = 4, // Без звука
INJ_SHOW_PARTIAL = 8, // Без звука
INJ_SHOW_FULL = 16, // Без звука
INJ_SHOW_FADE = 32, // Сопровождается звуком исцеления
INJ_SHOW_BLINK = 64, // Сопровождается звуком REJECT
INJ_SHOW_ERROR = 128 // Сопровождается звуком REJECT
}

public plugin_precache() {
register_plugin("ACS injection med-kit", "1.0.6.2", "DEV-CS.RU");
acs_create_cvars();
}

public plugin_natives() {
register_native("acs_inj_get_user_injections", "native_acs_inj_get_injections");
register_native("acs_inj_add_user_injections", "native_acs_inj_add_injections");
register_native("acs_inj_reset_user_injections", "native_acs_inj_reset_injections");
register_native("acs_inj_get_user_injects", "native_acs_inj_get_injects");
register_native("acs_inj_is_user_injected", "native_acs_inj_is_injected");
register_native("acs_inj_is_user_injection", "native_acs_inj_is_injection");
}

public plugin_init() {
if (register_dictionary("acs_injection.txt") == 0)
server_print("[ACS_INJECT] Error: not fount dictionary <acs_injection.txt>");
RegisterHamPlayer(Ham_Spawn, "CBasePlayer_Spawn", .Post = true);
RegisterHamPlayer(Ham_Killed, "CBasePlayer_Killed", .Post = true);
register_event("CurWeapon", "check_weapon", "be", "1=1");
RegisterHam(Ham_Item_Deploy, "weapon_knife", "CBasePlayerWeapon_Deploy", .Post = true);
RegisterHam(Ham_Item_CanHolster, "weapon_knife", "CBasePlayerWeapon_CanHolster");
}

public client_putinserver(id) {
// Используем STEAM только если игрок не соответствует флагам доступа (чтобы различить количество выдаваемых в начале раунда шприцов по кварам)
acs_injections[id][IS_STEAM] = (CVAR[SPAWN_BONUS_STEAM_COUNT] && (!((get_user_flags(id) & read_flags(CVAR[ACCESS])) || (!read_flags(CVAR[ACCESS])))) && is_user_steam(id));
acs_injections[id][COUNT]
= acs_injections[id][USED]
= 0;
acs_injections[id][REMAINS_INJECT] = 0.0;
acs_injections[id][IS_INJECT] = false;
}

public client_disconnected(id) {
// Ждем вас снова!
}

public CBasePlayer_OnSpawnEquip(id) {
if (CVAR[SPAWN])
acs_injections[id][COUNT] = 0;
if (acs_inj_check_access(id))
acs_inj_add_injection_count(id, (acs_injections[id][IS_STEAM] ? CVAR[SPAWN_BONUS_STEAM_COUNT] : CVAR[SPAWN_BONUS_COUNT]));
}

public CBasePlayer_Spawn(id) {
acs_injections[id][IS_INJECT] = false;
acs_injections[id][REMAINS_INJECT] = 0.0;
acs_injections[id][USED] = 0;
}

public CBasePlayer_Killed(id) {
acs_injections[id][IS_INJECT] = false;
acs_injections[id][REMAINS_INJECT] = 0.0;
acs_injections[id][USED] = 0;
if (CVAR[KILL])
acs_injections[id][COUNT] = 0;
}

public check_weapon(id) {
// Если во время анимации переключили оружие, останавливаем лечение
if ((!CVAR[BLOCK]) && acs_injections[id][IS_INJECT] && get_member(id, m_pActiveItem) != get_member(id, m_rgpPlayerItems, KNIFE_SLOT))
acs_injections[id][IS_INJECT] = false;
return;
}

public bool:Command_BuyMedkit(id) {
return acs_inj_add_injection_count(id, CVAR[AES_BUY_COUNT]);
}

public bool:acs_inj_check_access(id) {
return is_valid_player(id) ? ((get_user_flags(id) & read_flags(CVAR[ACCESS])) || (!read_flags(CVAR[ACCESS])) || acs_injections[id][IS_STEAM]) : false;
}

public bool:acs_inj_add_injection_count(id, count) {
static bool:b_result, i_count;
if ((b_result = (count > 0))) {
if ((b_result = (acs_injections[id][USED] < CVAR[MAX_TIMES]))) {
if ((b_result = (acs_injections[id][COUNT] < CVAR[MAX_COUNT]))) {
// Если выдаем (покупаем) больше лимита - обрезаем под лимит, чтобы получить хоть сколько-нибудь шприцов, а не ошибку
i_count = ((acs_injections[id][COUNT] + count) <= CVAR[MAX_COUNT]) ? count : (CVAR[MAX_COUNT] - acs_injections[id][COUNT]);
acs_injections[id][COUNT] += i_count;
if (i_count == 1)
acs_client_print(id, INJ_SHOW_GET, "%L", id, "INJ_GET_INJECT");
else
acs_client_print(id, INJ_SHOW_GET, "%L", id, "INJ_GET_INJECT_COUNT", i_count, fmt("%L", id, fmt("INJ_COUNT_%d_SUFFIX", (i_count % 10))));
if (acs_injections[id][COUNT] > 1)
acs_client_print(id, INJ_SHOW_TOTAL, "%L", id, "INJ_TOTAL_COUNT", acs_injections[id][COUNT], fmt("%L", id, fmt("INJ_COUNT_%d_SUFFIX", acs_injections[id][COUNT] % 10)));
} else
acs_client_print(id, INJ_SHOW_ERROR, "%L", id, "INJ_MAX_COUNT");
} else
acs_client_print(id, INJ_SHOW_ERROR, "%L", id, "INJ_LIMIT");
}
return b_result;
}

public cmd_injection(id) {
if (acs_inj_check_access(id)) {
if (acs_inj_can_get_inject(id))
acs_inj_add_injection_count(id, CVAR[CMD_COUNT]);
} else
acs_client_print(id, INJ_SHOW_ERROR, "%L", id, "INJ_ACCESS");
return PLUGIN_HANDLED;
}

public @use_injection(id)
{
static p_result, Float:f_inj_time, Float:CUR_HEALTH, Float:MAX_HEALTH, Float:HEALTH_UP;
p_result = PLUGIN_CONTINUE;
if (acs_inj_can_use_inject(id)) {
acs_injections[id][WEAPON] = get_member(id, m_pActiveItem);
CUR_HEALTH = Float:get_entvar(id, var_health);
MAX_HEALTH = Float:get_entvar(id, var_max_health);
// Если лечим не до максимального уровня, проверяем остаток
if (CVAR[HEALTH] > 0)
// Если Не закончили лечение, продолжаем
if (acs_injections[id][REMAINS_INJECT] > 0)
HEALTH_UP = acs_injections[id][REMAINS_INJECT];
// Иначе начинаем новое
else
HEALTH_UP = float(CVAR[HEALTH]);
else
HEALTH_UP = MAX_HEALTH - CUR_HEALTH;
acs_injections[id][REMAINS_INJECT] = HEALTH_UP;
switch (CVAR[SPEED_DYNAMIC]) {
case 1: gi_cure_speed[id] = floatround(CVAR[SPEED] * (CUR_HEALTH / (MAX_HEALTH - CVAR[HEALTH]))) + 2;
case 2: gi_cure_speed[id] = floatround(CVAR[SPEED] * (HEALTH_UP / CVAR[HEALTH])) + 2;
case 3: gi_cure_speed[id] = floatround(CVAR[SPEED] * (CUR_HEALTH / (MAX_HEALTH - CVAR[HEALTH])) * (HEALTH_UP / CVAR[HEALTH])) + 2;
default: gi_cure_speed[id] = CVAR[SPEED];
}
f_inj_time = acs_injections[id][REMAINS_INJECT] / gi_cure_speed[id];
//console_print(id, "[DEBUG] CURR = %f, MAX = %f, SPEED = %d, TIME = %f", CUR_HEALTH, MAX_HEALTH, gi_cure_speed[id], f_inj_time);
rg_switch_weapon(id, get_member(id, m_rgpPlayerItems, KNIFE_SLOT));
if (CVAR[V_MODEL][0] && CVAR[P_MODEL][0]) {
set_entvar(id, var_viewmodel, CVAR[V_MODEL]);
set_entvar(id, var_weaponmodel, CVAR[P_MODEL]);
acs_send_weapon_anim(id, CVAR[SEQUENCE]);
}
set_member(id, m_flNextAttack, f_inj_time);
if (CVAR[BAR] && f_inj_time > 1.0)
rg_send_bartime(id, floatround(f_inj_time));
if (CVAR[PRE_SAMPLE][0])
rh_emit_sound2(id, 0, CHAN_ITEM, CVAR[PRE_SAMPLE]);
gf_cure_time[id] = 0.0;
acs_injections[id][IS_INJECT] = true;
//console_print(id, "[DEBUG] is_inject = %d", acs_injections[id][IS_INJECT]);
RequestFrame("@inject_engine", id)
p_result = PLUGIN_HANDLED;
}
return p_result;
}

@inject_engine(id) {
static Float:f_time, s_classname[8];
if ((!acs_injections[id][IS_INJECT]) || get_member_game(m_bRoundTerminating)) {
if (is_valid_player(id)) {
if (CVAR[BAR])
rg_send_bartime(id, 0);
if (is_user_alive(id)) {
if ((get_member(id, m_pActiveItem) == get_member(id, m_rgpPlayerItems, KNIFE_SLOT)))
if ((!is_nullent(acs_injections[id][WEAPON])) && is_entity(acs_injections[id][WEAPON])) {
get_entvar(acs_injections[id][WEAPON], var_classname, s_classname, charsmax(s_classname))
if ((contain(s_classname, "weapon_") == 0) && (get_member(acs_injections[id][WEAPON], m_pPlayer) == id))
rg_switch_weapon(id, acs_injections[id][WEAPON]);
else
rg_switch_weapon(id, get_member(id, m_rgpPlayerItems, KNIFE_SLOT));
} else
rg_switch_weapon(id, get_member(id, m_rgpPlayerItems, KNIFE_SLOT));
set_member(id, m_flNextAttack, CVAR[NEXT_ATTACK]);
if (acs_injections[id][REMAINS_INJECT] == 0.0) {
if (CVAR[NOTIFY_MODE] & INJ_SHOW_FADE)
acs_screen_fade(id, { 0, 200, 0 }, 1.5, 0.6, 200);
if (CVAR[NOTIFY_SOUND_MODE] & INJ_SHOW_FADE)
rh_emit_sound2(id, 0, CHAN_ITEM, CVAR[SAMPLE]);
// Проверяем, чтобы не уйти в минус (сторонние плагины могут забрать шприцы в процессе лечения)
if (acs_injections[id][COUNT] > 0)
acs_injections[id][COUNT]--;
else
acs_injections[id][COUNT] = 0;
acs_injections[id][USED]++;
if (acs_injections[id][COUNT])
acs_client_print(id, INJ_SHOW_LEFT, "%L", id, "INJ_LEFT_COUNT", fmt("%L", id, fmt("INJ_COUNT_%d_PREFIX", (acs_injections[id][COUNT] % 10))), acs_injections[id][COUNT], fmt("%L", id, fmt("INJ_COUNT_%d_SUFFIX", (acs_injections[id][COUNT] % 10))));
}
if (Float:get_entvar(id, var_health) == Float:get_entvar(id, var_max_health))
acs_client_print(id, INJ_SHOW_FULL, "%L", id, "INJ_SUCCESFULLY_INJECTED_FULL");
else
acs_client_print(id, INJ_SHOW_PARTIAL, "%L", id, "INJ_SUCCESFULLY_INJECTED");
}
rg_add_account(id, -CVAR[COST]); // Никаких кредитов, списываем деньги сразу по окончании лечения, чтобы пациент не сдох раньше оплаты
}
} else {
f_time = get_gametime();
if (gf_cure_time[id] < f_time) {
//console_print(id, "[DEBUG] f_time = %f, cure_time = %f, cure_speed = %d", f_time, gf_cure_time[id], gi_cure_speed[id]);
acs_injections[id][REMAINS_INJECT] = acs_injections[id][REMAINS_INJECT] - 1.0;
if (!(ExecuteHamB(Ham_TakeHealth, id, 1.0, DMG_GENERIC) && acs_injections[id][REMAINS_INJECT] > 0.0)) {
acs_injections[id][REMAINS_INJECT] = 0.0;
acs_injections[id][IS_INJECT] = false;
}
gf_cure_time[id] = f_time + 1.0 / gi_cure_speed[id];
}
RequestFrame("@inject_engine", id);
}
}

public CBasePlayerWeapon_CanHolster(p_weapon) {
static bool:b_result, i_player;
i_player = get_member(p_weapon, m_pPlayer);
//console_print(i_player, "[DEBUG] player = %d, block = %d, is_inj = %d", i_player, CVAR[BLOCK], acs_injections[i_player][IS_INJECT]);
SetHamReturnInteger(!(b_result = CVAR[BLOCK] && acs_injections[i_player][IS_INJECT]));
return (b_result) ? HAM_SUPERCEDE: HAM_IGNORED;
}

public CBasePlayerWeapon_Deploy(p_weapon) {
static i_player;
i_player = get_member(p_weapon, m_pPlayer);
if (CVAR[CHEAT]
&& (!acs_injections[i_player][COUNT])
&& (Float:get_entvar(i_player, var_health) < Float:get_entvar(i_player, var_max_health) / 2.0)
&& (!random(5)))
acs_inj_add_injection_count(i_player, 1);
}

acs_create_cvars() {
static s_cmd_name[32];
bind_pcvar_string(create_cvar("acs_inj_prefix", "^4[Injection]", .description = "Префикс в чате"), CVAR[PREFIX], charsmax(CVAR[PREFIX]));
bind_pcvar_num(create_cvar("acs_inj_enable", "1", .description = "0 - Выкл. 1 - Вкл.", .has_min=true, .min_val=0.0, .has_max=true, .max_val=1.0), CVAR[ENABLE]);
bind_pcvar_string(create_cvar("acs_inj_access", "s", .description = "Флаги доступа (оставьте пустым для выдачи всем игрокам)"), CVAR[ACCESS], charsmax(CVAR[ACCESS]));
bind_pcvar_string(create_cvar("acs_inj_commands", "/acs_injection /acs_inject", .description = "Команды для получения шприца (оставьте пустым чтобы отключить)"), CVAR[COMMANDS], charsmax(CVAR[COMMANDS]));
bind_pcvar_num(create_cvar("acs_inj_spawn_bonus_count", "1", .description = "Сколько шприцов выдавать бесплатно в начале раунда игрокам с флагами доступа", .has_min=true, .min_val=0.0, .has_max=true, .max_val=10.0), CVAR[SPAWN_BONUS_COUNT]);
bind_pcvar_num(create_cvar("acs_inj_spawn_bonus_steam_count", "1", .description = "Сколько шприцов выдавать бесплатно в начале раунда игрокам STEAM (не используется, если флаги доступа не заданы)", .has_min=true, .min_val=0.0, .has_max=true, .max_val=10.0), CVAR[SPAWN_BONUS_STEAM_COUNT]);
bind_pcvar_num(create_cvar("acs_inj_aes_buy_count", "1", .description = "Сколько шприцов выдавать при покупке через AES-Bonus", .has_min=true, .min_val=1.0, .has_max=true, .max_val=10.0), CVAR[AES_BUY_COUNT]);
bind_pcvar_num(create_cvar("acs_inj_cmd_count", "1", .description = "Сколько шприцов выдавать по команде acs_inj_commands", .has_min=true, .min_val=1.0, .has_max=true, .max_val=10.0), CVAR[CMD_COUNT]);
bind_pcvar_num(create_cvar("acs_inj_use_method", "4", .description = "Метод использования:^n0 - через Z (radio1)^n1 - через X (radio2)^n2 - через C (radio3)^n3 - через Q (drop)^n4 - через F (<фонарь> - impulse 100)", .has_max = true, .max_val = 4.0), CVAR[USE_METHOD]);
bind_pcvar_num(create_cvar("acs_inj_speed", "10", .description = "Скорость лечения (HP в секунду)", .has_min=true, .min_val=1.0, .has_max=true, .max_val=100.0), CVAR[SPEED]);
bind_pcvar_num(create_cvar("acs_inj_speed_dynamic", "3", .description = "Изменять время лечения в зависимости от:^n 0 - Выкл.^n1 - текущей величины здоровья^2 - неиспользованного остатка шприца^n3 - оба варианта", .has_min=true, .min_val=0.0, .has_max=true, .max_val=3.0), CVAR[SPEED_DYNAMIC]);
bind_pcvar_num(create_cvar("acs_inj_block", "0", .description = "Блокировать смену оружия в процессе лечения", .has_min=true, .min_val=0.0, .has_max=true, .max_val=1.0), CVAR[BLOCK]);
bind_pcvar_float(create_cvar("acs_inj_next_attack", "0.0", .description = "Через сколько секунд после лечения можно стрелять", .has_min=true, .min_val=0.0, .has_max=true, .max_val=10.0), CVAR[NEXT_ATTACK]);
bind_pcvar_num(create_cvar("acs_inj_health", "30", .description = "Величина пополняемого здоровья, 0 - MAX ", .has_min = true, .has_max = true, .min_val = 0.0, .max_val = 100.0), CVAR[HEALTH]);
bind_pcvar_num(create_cvar("acs_inj_max_use", "3", .description = "Максимальное кол-во использований за раунд", .has_min = true, .min_val = 1.0, .has_max=true, .max_val=10.0), CVAR[MAX_TIMES]);
bind_pcvar_num(create_cvar("acs_inj_max_count", "3", .description = "Сколько максимально игрок может иметь с собой шприцов", .has_min=true, .min_val=0.0, .has_max=true, .max_val=10.0), CVAR[MAX_COUNT]);
bind_pcvar_num(create_cvar("acs_inj_sequence", "0", .description = "Индекс анимации модели шприца", .has_min=true, .min_val=0.0, .has_max=true, .max_val=100.0), CVAR[SEQUENCE]);
bind_pcvar_num(create_cvar("acs_inj_cost", "0", .description = "Стоимость услуги", .has_min=true, .min_val=0.0, .has_max=true, .max_val=16000.0), CVAR[COST]);
bind_pcvar_num(create_cvar("acs_inj_bar", "1", .description = "Включить линию прогресса", .has_min=true, .min_val=0.0, .has_max=true, .max_val=1.0), CVAR[BAR]);
bind_pcvar_num(create_cvar("acs_inj_vip", "0", .description = "Запретить VIP игроку использовать шприц на as_* картах", .has_min=true, .min_val=0.0, .has_max=true, .max_val=1.0), CVAR[VIP]);
bind_pcvar_num(create_cvar("acs_inj_win_diff", "5", .description = "Если разница между победами команд превышает это значение, блокировать шприц для доминантной команды (0 - Выкл.)", .has_min=true, .min_val=0.0, .has_max=true, .max_val=10.0), CVAR[DIFF]);
bind_pcvar_num(create_cvar("acs_inj_win_diff_mode", "0", .description = "Режим определения доминантной команды:^n0 - доминирование на N очков^n1 - имеет подряд N побед", .has_min=true, .min_val=0.0, .has_max=true, .max_val=1.0), CVAR[DIFF_MODE]);
bind_pcvar_num(create_cvar("acs_inj_notify_mode", "255", .description = "Режим вывода уведомлений по действиям шприца:^n0 - Выкл.^n1 - получение шприца^n2 - количествово шприцов с собой^n4 - остаток шприцов^n8 - частичное излечение^n16 - полное излечение^n32 - затемнение экрана^n64 - мигание строки баланса^n128 - ошибки по действиям шприца^n(для произвольной комбинации необходимо сложить значения нужных пунктов)", .has_min=true, .min_val=0.0, .has_max=true, .max_val=255.0), CVAR[NOTIFY_MODE]);
bind_pcvar_num(create_cvar("acs_inj_notify_sound_mode", "160", .description = "Режим сопровождения звуком уведомлений по действиям шприца:^n0 - Выкл.^n1 - получение шприца^n32 - звук излечения^n128 - ошибки по действиям шприца^n(для произвольной комбинации необходимо сложить значения нужных пунктов)", .has_min=true, .min_val=0.0, .has_max=true, .max_val=255.0), CVAR[NOTIFY_SOUND_MODE]);
bind_pcvar_num(create_cvar("acs_inj_spawn_reset", "1", .description = "Обнулять кол-во шприцов в начале раунда", .has_min=true, .min_val=0.0, .has_max=true, .max_val=1.0), CVAR[SPAWN]);
bind_pcvar_num(create_cvar("acs_inj_kill_reset", "1", .description = "Обнулять кол-во шприцов после смерти", .has_min=true, .min_val=0.0, .has_max=true, .max_val=1.0), CVAR[KILL]);
bind_pcvar_num(create_cvar("acs_inj_cheat", "1", .description = "Выдать шприц с 20% вероятностью игроку со здоровьем <50 при переключении оружия", .has_min=true, .min_val=0.0, .has_max=true, .max_val=1.0), CVAR[CHEAT]);
bind_pcvar_string(create_cvar("acs_inj_v_model", "models/v_healshot.mdl", .description = "V модель шприца (опционально)"), CVAR[V_MODEL], charsmax(CVAR[V_MODEL]));
bind_pcvar_string(create_cvar("acs_inj_p_model", "models/p_healshot.mdl", .description = "P модель шприца (опционально)"), CVAR[P_MODEL], charsmax(CVAR[P_MODEL]));
bind_pcvar_string(create_cvar("acs_inj_pre_sample", "injection/pre_medshot.wav", .description = "Звук до иньекции (опционально)"), CVAR[PRE_SAMPLE], charsmax(CVAR[PRE_SAMPLE]));
bind_pcvar_string(create_cvar("acs_inj_sample", "injection/medshot.wav", .description = "Звук после иньекции (опционально)"), CVAR[SAMPLE], charsmax(CVAR[SAMPLE]));
if (file_exists(fmt("sound/%s", ACS_INJ_SOUND_NOTIFY)))
precache_sound(ACS_INJ_SOUND_NOTIFY);
if (file_exists(fmt("sound/%s", ACS_INJ_SOUND_REJECT)))
precache_sound(ACS_INJ_SOUND_REJECT);
if (CVAR[V_MODEL][0])
precache_model(CVAR[V_MODEL]);
if (CVAR[P_MODEL][0])
precache_model(CVAR[P_MODEL]);
if (CVAR[PRE_SAMPLE][0])
precache_sound(CVAR[PRE_SAMPLE]);
if (CVAR[SAMPLE][0])
precache_sound(CVAR[SAMPLE]);
while (argbreak(CVAR[COMMANDS], s_cmd_name, charsmax(s_cmd_name), CVAR[COMMANDS], charsmax(CVAR[COMMANDS])) != INVALID_HANDLE) {
if (s_cmd_name[0] == '/' || s_cmd_name[0] == '!' || s_cmd_name[0] == '.') {
register_clcmd(fmt("say %s", s_cmd_name), "cmd_injection");
register_clcmd(fmt("say_team %s", s_cmd_name), "cmd_injection");
} else
register_clcmd(s_cmd_name, "cmd_injection", CVAR[ACCESS]);
}
switch (CVAR[USE_METHOD]) {
case 0: register_clcmd("radio1", "@use_injection");
case 1: register_clcmd("radio2", "@use_injection");
case 2: register_clcmd("radio3", "@use_injection");
case 3: register_clcmd("drop", "@use_injection");
case 4: register_impulse(100, "@use_injection");
}
if (CVAR[SPAWN_BONUS_COUNT] || CVAR[SPAWN_BONUS_STEAM_COUNT])
RegisterHookChain(RG_CBasePlayer_OnSpawnEquip, "CBasePlayer_OnSpawnEquip", true);
AutoExecConfig(.name = "acs_injection");
}

public native_acs_inj_get_injections(const plugin_id, const argc) {
enum { arg_id = 1 }
static id;
id = get_param(arg_id);
return is_valid_player(id) ? acs_injections[id][COUNT] : 0;
}

public native_acs_inj_add_injections(const plugin_id, const argc) {
enum { arg_id = 1, arg_add_value }
static id, add_value, bool:b_result;
id = get_param(arg_id);
add_value = get_param(arg_add_value);
if ((b_result = bool:is_user_alive(id)))
//Проверяем чтобы не уйти в минус
if (acs_injections[id][COUNT] + add_value >= 0)
acs_injections[id][COUNT] += add_value;
return b_result;
}

public native_acs_inj_reset_injections(plugin_id, num_params) {
enum { arg_id = 1 }
static id, bool:b_result;
id = get_param(arg_id);
if ((b_result = is_valid_player(id)))
acs_injections[id][COUNT] = 0;
return b_result;
}

public native_acs_inj_get_injects(plugin_id, num_params) {
enum { arg_id = 1 }
static id;
id = get_param(arg_id);
return is_valid_player(id) ? acs_injections[id][USED] : 0;
}

public native_acs_inj_is_injected(plugin_id, num_params) {
enum { arg_id = 1 }
static id;
id = get_param(arg_id);
return is_valid_player(id) ? (acs_injections[id][USED] > 0) : false;
}

public native_acs_inj_is_injection(plugin_id, num_params) {
enum { arg_id = 1 }
static id;
id = get_param(arg_id);
return is_user_alive(id) ? acs_injections[id][IS_INJECT] : false;
}

stock acs_check_throttling(id) {
static Float:f_time, Float:f_delta;
f_time = get_gametime();
f_delta = f_time - ACS_PRINT_THR[id][LAST_USAGE];
if (ACS_PRINT_THR[id][FLAG]) {
if (f_delta > 4 * 0.75)
ACS_PRINT_THR[id][FLAG] = false;
} else if (f_delta < 0.75)
ACS_PRINT_THR[id][FLAG] = true;
ACS_PRINT_THR[id][LAST_USAGE] = f_time;
return !ACS_PRINT_THR[id][FLAG];
}

stock acs_client_print(const id, const notify_mode, const message[], any:...) {
static s_tmp[190];
// Отключаем проверку троттлинга, если сообщение без звуковых уведомлений (если сообщения показываются подряд - второе и последующие должны быть без звука)
if ((CVAR[NOTIFY_MODE] & notify_mode) && ((id == 0) || is_valid_player(id)) && (acs_check_throttling(id) || (!((CVAR[NOTIFY_SOUND_MODE] & ACS_INJ_SOUND_MASK) & notify_mode)))) {
vformat(s_tmp, charsmax(s_tmp), message, 4);
if (CVAR[PREFIX])
format(s_tmp, charsmax(s_tmp), "%s %s", CVAR[PREFIX], s_tmp);
client_print_color(id, ((notify_mode & INJ_SHOW_ERROR) ? print_team_red : print_team_blue), s_tmp);
if ((CVAR[NOTIFY_SOUND_MODE] & ACS_INJ_SOUND_MASK) & notify_mode)
acs_send_audio(id, ((notify_mode & INJ_SHOW_ERROR) ? ACS_INJ_SOUND_REJECT : ACS_INJ_SOUND_NOTIFY));
}
}

stock bool:acs_inj_can_get_inject(id) {
new bool:b_result = false;
if (CVAR[ENABLE]) {
if ((!(CVAR[VIP] && get_member(id, m_bIsVIP)))) {
if (is_user_alive(id)) {
if (!is_team_dominate(id)) {
if (!(b_result = (get_member(id, m_iAccount) >= CVAR[COST])))
acs_blink_account(id);
} else
acs_client_print(id, INJ_SHOW_ERROR, "%L", id, "INJ_DOMINA");
} else
acs_client_print(id, INJ_SHOW_ERROR, "%L", id, "INJ_ALIVE");
} else
acs_client_print(id, INJ_SHOW_ERROR, "%L", id, "INJ_VIP");
}
//console_print(id, "[DEBUG] can_get_inject = %d", b_result);
return b_result;
}

stock bool:acs_inj_can_use_inject(id) {
static p_weapon;
new bool:b_result = false;
//console_print(id, "[DEBUG] used = %d, count = %d", acs_injections[id][USED], acs_injections[id][COUNT]);
if ((!acs_injections[id][IS_INJECT])
&& (!get_member_game(m_bRoundTerminating))
&& acs_inj_can_get_inject(id)
&& (Float:get_entvar(id, var_health) < Float:get_entvar(id, var_max_health))) {
if (acs_injections[id][COUNT]) {
if ((b_result = acs_injections[id][USED] < CVAR[MAX_TIMES])) {
if (b_result && (CVAR[USE_METHOD] < 4)) {
p_weapon = get_member(id, m_pActiveItem);
b_result = ((!is_nullent(p_weapon)) && is_entity(p_weapon) && (get_member(p_weapon, m_iId) == CSW_KNIFE))
}
} else
acs_client_print(id, INJ_SHOW_ERROR, "%L", id, "INJ_LIMIT");
} else
acs_client_print(id, INJ_SHOW_ERROR, "%L", id, "INJ_DONT_HAVE");
}
return b_result;
}

stock acs_send_audio(const id, const sample[]) {
static i_msg;
if(sample[0]) {
if ((id == 0) || is_valid_player(id)) {
if(!i_msg) {
i_msg = get_user_msgid("SendAudio");
}
message_begin(id ? MSG_ONE_UNRELIABLE : MSG_BROADCAST, i_msg, .player = id);
{
write_byte(id);
write_string(sample);
write_short(PITCH_NORM);
}
message_end();
}
}
}

stock bool:is_team_dominate(id) {
static i_diff;
return (CVAR[DIFF] && (get_member(id, m_iTeam) == acs_get_team_dominate(i_diff))) ? (i_diff > CVAR[DIFF]) : false;
}

stock TeamName:acs_get_team_dominate(&diff = 0) {
static TeamName:t_team;
t_team = TEAM_UNASSIGNED;
if ((diff = (CVAR[DIFF_MODE] ? (get_member_game(m_iNumConsecutiveCTLoses) - get_member_game(m_iNumConsecutiveTerroristLoses)) : (get_member_game(m_iNumTerroristWins) - get_member_game(m_iNumCTWins))) > 0))
t_team = TEAM_TERRORIST;
else if (diff < 0)
t_team = TEAM_CT;
abs(diff);
return t_team;
}

stock acs_send_weapon_anim(const id, const sequence) {
if (is_valid_player(id) && is_user_alive(id)) {
set_entvar(id, var_weaponanim, sequence);
message_begin(MSG_ONE_UNRELIABLE, SVC_WEAPONANIM, .player = id);
{
write_byte(sequence);
write_byte(0);
}
message_end();
}
}

stock acs_screen_fade(id = 0, v_color[3] = { 0, 0, 0 }, Float:f_time = -1.0, Float:hold_time = 0.0, alpha = 0, flags = FFADE_IN, bool:reliable = false) {
static i_fade_time, i_msg, i_msg_dest;
if (is_valid_player(id) && is_user_alive(id)) {
if (get_member(id, m_blindUntilTime) < get_gametime()) {
if (f_time == -1.0)
i_fade_time = 4;
else
i_fade_time = clamp(floatround(f_time * (1 << 12)), 0, 0xFFFF);
if (!i_msg)
i_msg = get_user_msgid("ScreenFade");
if (reliable)
i_msg_dest = id ? MSG_ONE : MSG_ALL;
else
i_msg_dest = id ? MSG_ONE_UNRELIABLE : MSG_BROADCAST;
message_begin(i_msg_dest, i_msg, .player = id);
{
write_short(i_fade_time);
write_short(clamp(floatround(hold_time * (1 << 12)), 0, 0xFFFF));
write_short(flags);
write_byte(v_color[0]);
write_byte(v_color[1]);
write_byte(v_color[2]);
write_byte(alpha);
}
message_end();
}
}
}

stock acs_blink_account(id) {
static i_msg;
if (is_valid_player(id) && is_user_alive(id)) {
if ((CVAR[NOTIFY_MODE] & INJ_SHOW_ERROR))
acs_client_print(id, INJ_SHOW_ERROR, "%L", id, "INJ_NOT_ENOUGH");
if ((CVAR[NOTIFY_MODE] & INJ_SHOW_BLINK) && (i_msg || (i_msg = get_user_msgid("BlinkAcct")))) {
message_begin(MSG_ONE_UNRELIABLE, i_msg, .player = id);
{
write_byte(3);
}
message_end();
}
}
}
Плагин работает все норм, логи ошибок появлюяются и не понятно как исправить,debug ружим тоже подключал
 
В этой теме было размещено решение! Перейти к решению.
Сообщения
11
Реакции
0
@Алексеич,включить debug и вывод лога скинуть ?
 
Сообщения
60
Реакции
8
Возможно стоит ReGame и ReAPI обновить
 
Сообщения
11
Реакции
0
@okidokki,плагины приватные из-за ReAPI обновления не слетят?
 
Сообщения
11
Реакции
0
@okidokki,нет, плагины оружий и моделей мне делали под мою версию ReAPI
 
Сообщения
60
Реакции
8
@armyan,думаю все нормально будет
 
Сообщения
3,036
Реакции
1,735
Помог
80 раз(а)
okidokki, у скальпеля плагины не приватные, их может купить любой желающий, от чего приватными их назвать нельзя
24 Окт 2024
armyan, конечно, там будет показано, в какой строке ошибка
 
Сообщения
11
Реакции
0
@Алексеич,не знаю че за фигня до этого была, носейчас debug прописал и логи чистые)
жду когда появятся)
 
Сообщения
11
Реакции
0
@Алексеич,вылезла)



L 10/24/2024 - 20:45:13: Start of error session.
L 10/24/2024 - 20:45:13: Info (map "de_mirage2") (file "addons/amxmodx/logs/error_20241024.log")
L 10/24/2024 - 20:45:13: [ReAPI] rg_switch_weapon: Invalid entity weapon
L 10/24/2024 - 20:45:13: [AMXX] Displaying debug trace (plugin "acs_injection.amxx", version "1.0.6.2")
L 10/24/2024 - 20:45:13: [AMXX] Run time error 10: native error (native "rg_switch_weapon")
L 10/24/2024 - 20:45:13: [AMXX] [0] acs_injection.sma::@use_injection (line 177)
L 10/24/2024 - 21:07:27: Start of error session.
L 10/24/2024 - 21:07:27: Info (map "de_berzerker") (file "addons/amxmodx/logs/error_20241024.log")
L 10/24/2024 - 21:07:27: [ReAPI] rg_switch_weapon: Invalid entity weapon
L 10/24/2024 - 21:07:27: [AMXX] Displaying debug trace (plugin "acs_injection.amxx", version "1.0.6.2")
L 10/24/2024 - 21:07:27: [AMXX] Run time error 10: native error (native "rg_switch_weapon")
L 10/24/2024 - 21:07:27: [AMXX] [0] acs_injection.sma::@use_injection (line 177)
L 10/24/2024 - 21:07:33: [ReAPI] rg_switch_weapon: Invalid entity weapon
L 10/24/2024 - 21:07:33: [AMXX] Displaying debug trace (plugin "acs_injection.amxx", version "1.0.6.2")
L 10/24/2024 - 21:07:33: [AMXX] Run time error 10: native error (native "rg_switch_weapon")
L 10/24/2024 - 21:07:33: [AMXX] [0] acs_injection.sma::@use_injection (line 177)
 
Сообщения
75
Реакции
82
Помог
6 раз(а)
177 строка кода
Код:
rg_switch_weapon(id, get_member(id, m_rgpPlayerItems, KNIFE_SLOT));
-->

Код:
new iItem = get_member(id, m_rgpPlayerItems, KNIFE_SLOT);

if (!is_nullent(iItem))
    rg_switch_weapon(id, iItem);
 
Сообщения
11
Реакции
0
@Flymic24,нужно в исходнике получается заменить строку и скомпилировать потом ?
 
Сообщения
11
Реакции
0
@Flymic24,не компилируется чет, просьба если не трудно сделать,может чет не где делаю
 

Вложения

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу