Revive teammates error

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
290
Реакции
28
Помог
2 раз(а)
Ошибка
L 01/24/2023 - 04:44:24: Start of error session.
L 01/24/2023 - 04:44:24: Info (map "de_dust2") (file "addons/amxmodx/logs/error_20230124.log")
L 01/24/2023 - 04:44:24: Client index 16 is invalid
L 01/24/2023 - 04:44:24: [AMXX] Displaying debug trace (plugin "rt_core.amxx", version "0.11.0")
L 01/24/2023 - 04:44:24: [AMXX] Run time error 10: native error (native "client_print_color")
L 01/24/2023 - 04:44:24: [AMXX] [0] rt_core.sma::Corpse_Think (line 230)
ОС
Linux
Amx Mod X
amxx version
AMX Mod X 1.9.0.5294 (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: Dec 3 2021 15:54:56
Built from: https://github.com/alliedmodders/amxmodx/commit/363871a
Build ID: 5294:363871a
Core mode: JIT+ASM32
Билд
version
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.12.0.780-dev
Build date: 16:20:56 Sep 19 2022 (3082)
Build from: https://github.com/dreamstalker/rehlds/commit/d6ebe82
ReGamedll
game version
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
meta version
Metamod-r v1.3.0.131, API (5:13)
Metamod-r build: 18:51:02 Jul 11 2022
Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/adc9414
Список метамодулей
Currently loaded plugins:
description stat pend file vers src load unload
[ 1] Reunion RUN - reunion_mm_i386.so v0.1.0.137 ini Start Never
[ 2] SafeNameAndChat RUN - SafeNameAndChat.so v1.2 Beta 3 ini ANY ANY
[ 3] VoiceTranscoder RUN - VoiceTranscoder.so v2017RC5 ini ANY ANY
[ 4] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5294 ini Start ANY
[ 5] Print Center Fix RUN - printcenterfix_mm_i386.so v2.0.1 ini ANY ANY
[ 6] ReAuthCheck RUN - reauthcheck_mm_i386.so v0.1.6 ini Start Never
[ 7] Rechecker RUN - rechecker_mm_i386.so v2.5 ini Chlvl ANY
[ 8] ReSemiclip RUN - resemiclip_mm_i386.so v2.3.9 ini Chlvl ANY
[ 9] ReSRDetector RUN - resrdetector_mm_i386.so v0.1.0 ini Chlvl ANY
[10] WHBlocker RUN - whblocker_mm_i386.so v1.5.697 ini Chlvl ANY
[11] HitBox Fix RUN - hitbox_fix_mm_i386.so v1.1.1 ini Start ANY
[12] AuthEmu RUN - authemu_amxx_i386.so v5.2.12.525-dev+m pl4 ANY Never
[13] Hide Cvars RUN - hidecvars_amxx_i386.so v1.0 pl4 ANY ANY
[14] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl4 ANY Never
[15] ReAPI RUN - reapi_amxx_i386.so v5.22.0.254-dev pl4 ANY Never
[16] MySQL RUN - mysql_amxx_i386.so v1.9.0.5294 pl4 ANY ANY
[17] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5294 pl4 ANY ANY
[18] CSX RUN - csx_amxx_i386.so v1.9.0.5294 pl4 ANY ANY
[19] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5294 pl4 ANY ANY
[20] Engine RUN - engine_amxx_i386.so v1.9.0.5294 pl4 ANY ANY
[21] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5294 pl4 ANY ANY
[22] GeoIP RUN - geoip_amxx_i386.so v1.9.0.5294 pl4 ANY ANY
[23] Fun RUN - fun_amxx_i386.so v1.9.0.5294 pl4 ANY ANY
[24] SxGeo RUN - sxgeo_amxx_i386.so v2.3 pl4 ANY Never
24 plugins, 24 running
Список плагинов
amxx plugins
Currently loaded plugins:
name version author file status
[ 1] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 2] Access Manager 1.0.0 mx?! AccessManager.a running
[ 3] [Advanced Slot Reserva 2.2 Shadows Adi advanced_slot_r debug
[ 4] OciXCrom's Rank System 3.10 OciXCrom crx_ranksystem. running
[ 5] CRXRanks: Happy Hour 1.0 OciXCrom crxranks_happyh running
[ 6] ExpMenu for CRXRanks 1.0.4 Nordic Warrior crxranks_exp_ed running
[ 7] [ReAPI] Healthnade 0.0.8f DEV-CS.RU Commun reapi_healthnad running
[ 8] Frags Counter 1.0 CHEL74 frags_counter.a running
[ 9] Mute Weapon Shots 0.2 RauliTop mute_weapon_sho running
[ 10] [ReAPI] Anti overflow 1.0 Some Author antioverflow.am running
[ 11] [190] VIP RBS 22.12.08BE SKAJIbnEJIb vip_rbs.amxx running
[ 12] FreshBans 1.4.7b kanagava fresh_bans_147- running
[ 13] WebHS 0.1 kanagava fb_web_online.a running
[ 14] fb_forwards 0.1.4 Kanagava & Realu fb_forwards.amx running
[ 15] DopBan 3.0.8b kanagava dopban308.amxx running
[ 16] [190] Damager RBS 20.06.06 SKAJIbnEJIb damager_rbs.amx running
[ 17] Private Message: Core 1.5 Denzer private_message running
[ 18] Private Message: Loggi 1.3 Denzer private_message running
[ 19] SERVER TASKS 2.0 HATTRICK (HTTRCK server_tasks.am running
[ 20] Command Restrictions 2.0 OciXCrom crx_command_res running
[ 21] Admin Commands 1.9.0.5294 AMXX Dev Team admincmd.amxx running
[ 22] Admin Help 1.9.0.5294 AMXX Dev Team adminhelp.amxx running
[ 23] Multi-Lingual System 1.9.0.5294 AMXX Dev Team multilingual.am running
[ 24] Menus Front-End 1.9.0.5294 AMXX Dev Team menufront.amxx running
[ 25] Commands Menu 1.9.0.5294 AMXX Dev Team cmdmenu.amxx running
[ 26] Players Menu 1.9.0.5294 AMXX Dev Team plmenu.amxx running
[ 27] Plugin Menu 1.9.0.5294 AMXX Dev Team pluginmenu.amxx running
[ 28] [190] Stimulation RBS 20.06.06 SKAJIbnEJIb stimulation_rbs running
[ 29] Pause Plugins 1.9.0.5294 AMXX Dev Team pausecfg.amxx running
[ 30] Stats Configuration 1.9.0.5294 AMXX Dev Team statscfg.amxx running
[ 31] StatsX 1.9.0.5294 AMXX Dev Team statsx.amxx running
[ 32] Top Awards 1.2.0 szawesome top_awards.amxx running
[ 33] Items Restrict 1.1 s1lent items_restrict. running
[ 34] Ping Faker 1.5a MeRcyLeZZ pingfaker_count running
[ 35] unknown unknown unknown flash.amxx running
[ 36] Blinding Time 0.0.1 Albertio cflash.amxx running
[ 37] Team Transfer 2.1 UnFoRgIvEn transfer_chat.a running
[ 38] Unlimited Choose Team 1.0 Javekson unlimited_choos running
[ 39] Parachute 1.3 Fixed KRoT@L/JTP10181 parasuta.amxx running
[ 40] Last Maps Time 0.0.1 Exolent last_maps_time. running
[ 41] Advanced Spam Nick Cha 0.2 Fullserver advanced_spam_n running
[ 42] MOTD Commands 1.3 OciXCrom crx_motdcommand running
[ 43] Advanced Kill Assists 1.3c Xelson next21_kill_ass running
[ 44] SHOW IP + LAST IP 2.0 Alka + x amx_showip_last running
[ 45] Reklama 09.07.2019 mx?! reklama.amxx running
[ 46] [190] CsStats ResetSco 20.06.06 SKAJIbnEJIb csstats_resetsc running
[ 47] CFG Slash 1.0 aNNakin cfg_slash.amxx running
[ 48] Server Menu 1.5.0 F@nt0M server_menu.amx running
[ 49] Admin Commands Log 1.2 w0w admin_commands_ running
[ 50] DemoRecoder 1.1 neygomon amx_demorec.amx running
[ 51] [190] Cvar On Map 20.06.06 SKAJIbnEJIb cvar_on_map.amx running
[ 52] Whatsapp_Group_Request 3.2 CrAzY MaN whatsapp_group_ running
[ 53] [ReAPI] AdminFreeLook 1.0 ReHLDS Team adminfreelook.a running
[ 54] [190] Warmup RBS 21.03.23 SKAJIbnEJIb warmup_rbs.amxx running
[ 55] Trial Access 1.0.0 mx?! trial_access.am running
[ 56] [190] Ultimate Flags 22.11.15 SKAJIbnEJIb ultimate_flags. running
[ 57] Slap/Slay Team 1.0 Kobra slaylslapteam.a running
[ 58] Auto Team Balance Adva 1.5.1 Radius auto_team_balan running
[ 59] Hide 1.1 xPaw hidexpaw.amxx running
[ 60] Save score & money 1.2.4 Minni Mouse Save_Score_and_ running
[ 61] Hostname Timeleft 1.0 xPaw HostnameTimelef running
[ 62] [ReAPI] Block 'Fire in 0.0.1 sergrib simpleblockfith running
[ 63] Online Logger 1.0.3 mx?! online_logger.a running
[ 64] 49 44 49 20 4E 41 58 59 49 ausermsg.amxx running
[ 65] Auto Join on Connect 0.1 VEN auto_join_on_co running
[ 66] M_AntiRusher 2.83 Miczu xPaw_Antirusher running
[ 67] Announcer Killstreak 2.1 Jumper & mx?! Announcer_Kills running
[ 68] Admin Groups 1.2 OciXCrom crx_admingroups running
[ 69] AFK Control 1.0 mx?! afk_control.amx running
[ 70] No Bhop and SGS/DDRun 1.1 Denzer no_bhop_sgs.amx running
[ 71] Invisible Spectator 0.2 ConnorMcLeod invi2.amxx running
[ 72] GSClient Auth 1.0 Dev-MS.ru gsclient.amxx running
[ 73] Admins Only 1.0 Andy staffonly.amxx running
[ 74] AMX Immunity 3.0 eVeste imuneoff.amxx running
[ 75] [SxGeo] Connect Info 1.0 s1lent sxgeo_connect_i running
[ 76] unknown unknown unknown fake.amxx running
[ 77] ASP 1.0.2 iPlague autospawnpoints running
[ 78] Yet Another Voteban 1.8 AndrewZ/voed yet_another_vot running
[ 79] [ReAPI:AMXX] Buy Nades 0.2 F@nt0M Buy_Nades_Timeo running
[ 80] Adverts hud 1.0.1 cpctrl adverts_hud.amx running
[ 81] Top Bomber 0.1.1 Albertio top_bomber.amxx running
[ 82] [190] BackWeapons RBS 20.06.06 SKAJIbnEJIb & ho backweapons_rbs running
[ 83] ChatAdditions: Core v1.9.1 Sergey Shorokhov ChatAdditions_C running
[ 84] ChatAdditions: CSBans v1.9.1 Sergey Shorokhov CA_Storage_CSBa running
[ 85] CA: Anti Flood v1.9.1 Nordic Warrior CA_AntiFlood.am running
[ 86] CA: Mute v1.9.1 Sergey Shorokhov CA_Mute.amxx running
[ 87] CA Addon: Death mute v1.9.1 Sergey Shorokhov CA_Addon_DeathM debug
[ 88] CA Addon: Request UnGA v1.9.1 steelzzz CA_Addon_Reques running
[ 89] CA: VoteGAG 1.0.0-alph Sergey Shorokhov CA_Addon_VoteGa running
[ 90] CA: Gag 3a4e0d1 Sergey Shorokhov CA_Gag.amxx running
[ 91] Chat Manager 4.8 OciXCrom crx_chatmanager running
[ 92] CM: Toggle Chat 4.1 OciXCrom crx_chatmanager running
[ 93] OciXCrom's Admin Chat 4.2 OciXCrom crx_adminchat.a running
[ 94] Revive Teammates: Core 0.11.0 ufame & Albertio rt_core.amxx debug
[ 95] Revive Teammates: Plan 0.11.0 ufame & Albertio rt_planting.amx running
[ 96] Revive Teammates: Rest 0.11.0 ufame & Albertio rt_restrictions running
[ 97] Revive Teammates: Time 0.11.0 ufame & Albertio rt_timer.amxx running
[ 98] Revive Teammates: Effe 0.11.0 ufame & Albertio rt_effects.amxx running
[ 99] Revive Teammates: Bonu 0.11.0 ufame & Albertio rt_bonus.amxx running
[100] Revive Teammates: Spri 0.11.0 ufame & Albertio rt_sprite.amxx running
[101] Map Manager: Core 3.1.5-5ee7 Mistrick map_manager_cor running
[102] Map Manager: Scheduler 0.1.11-5ee Mistrick map_manager_sch running
[103] Admin Mapmenu 0.5.3 d3m37r4 admin_mapmenu.a running
[104] Map Manager: Rtv 0.1.3 Mistrick map_manager_rtv running
[105] Map Manager: Nominatio 0.3.1 Mistrick map_manager_nom running
[106] Map Manager: BlockList 0.0.4-16b9 Mistrick map_manager_blo running
[107] Map Manager: Online so 0.0.4-5ee7 Mistrick map_manager_onl running
[108] Map Manager: Effects 0.1.1-5ee7 Mistrick map_manager_eff running
[109] Map Manager: Informer 0.0.5-5ee7 Mistrick map_manager_inf running
[110] Map Manager: Sounds 0.0.3-5ee7 Mistrick map_manager_sou running
[111] Map Manager: Advanced 0.1.0-5ee7 Mistrick map_manager_adv running
[112] Map Manager: Priority 0.0.2-5ee7 Mistrick map_manager_pri running
[113] Map Manager: Online ch 1.0.2-5ee7 Sergey Shorokhov map_manager_onl running
[114] Hide HUD/Menu on Vote 1.2.2 d3m37r4 hide_hud_and_me running
[115] unknown unknown unknown kobra_rtv_maps. running
[116] Molotov Cocktail API 2.16 Misha molotov_cocktai running
[117] Molotov Cocktail Spawn 1.5 Misha molotov_cocktai running
[118] AWP Restrictions 1.5.1 Radius awp_restriction running
[119] CT Bomb Cracker 0.5 Vaqtincha ct_bomb_cracker running
[120] Bet 2.2 Filip Vilicic bet.amxx running
[121] Style C4 Timer 3.0 OciXCrom crx_c4timer.amx running
[122] AMX Slay Losers 1.2 [email protected] slaylosers.amxx running
[123] Walkguard 1.0.0 mx?! walkguard.amxx running
123 plugins, 123 running
Автор плагина
ufame & Albertio
Версия плагина
0.11.0
Исходный код
#include <rt_api>

enum CVARS
{
Float:REVIVE_TIME,
Float:ANTIFLOOD_TIME,
Float:CORPSE_TIME,
Float:SEARCH_RADIUS
};

new g_eCvars[CVARS];

enum Forwards
{
ReviveStart,
ReviveLoop_Pre,
ReviveLoop_Post,
ReviveEnd,
ReviveCancelled,
CreatingCorpseStart,
CreatingCorpseEnd
};

new g_eForwards[Forwards];

new g_iPluginLoaded;

new Float:g_flLastUse[MAX_PLAYERS + 1], g_iTimeUntil[MAX_PLAYERS + 1];

public plugin_precache()
{
RegisterCvars();
UploadConfigs();
}

public plugin_init()
{
register_plugin("Revive Teammates: Core", VERSION, AUTHORS);

register_dictionary("rt_library.txt");

register_message(get_user_msgid("ClCorpse"), "MessageHook_ClCorpse");

RegisterHookChain(RG_CSGameRules_CleanUpMap, "CSGameRules_CleanUpMap_Post", .post = 1);
RegisterHookChain(RG_CBasePlayer_UseEmpty, "CBasePlayer_UseEmpty_Pre", .post = 0);

g_eForwards[ReviveStart] = CreateMultiForward("rt_revive_start", ET_STOP, FP_CELL, FP_CELL, FP_CELL, FP_CELL);
g_eForwards[ReviveLoop_Pre] = CreateMultiForward("rt_revive_loop_pre", ET_STOP, FP_CELL, FP_CELL, FP_CELL, FP_FLOAT, FP_CELL);
g_eForwards[ReviveLoop_Post] = CreateMultiForward("rt_revive_loop_post", ET_IGNORE, FP_CELL, FP_CELL, FP_CELL, FP_FLOAT, FP_CELL);
g_eForwards[ReviveEnd] = CreateMultiForward("rt_revive_end", ET_IGNORE, FP_CELL, FP_CELL, FP_CELL, FP_CELL);
g_eForwards[ReviveCancelled] = CreateMultiForward("rt_revive_cancelled", ET_IGNORE, FP_CELL, FP_CELL, FP_CELL, FP_CELL);
g_eForwards[CreatingCorpseStart] = CreateMultiForward("rt_creating_corpse_start", ET_STOP, FP_CELL, FP_CELL);
g_eForwards[CreatingCorpseEnd] = CreateMultiForward("rt_creating_corpse_end", ET_IGNORE, FP_CELL, FP_CELL, FP_ARRAY);

g_iPluginLoaded = is_plugin_loaded("rt_planting.amxx", true);
}

public client_disconnected(id)
{
g_flLastUse[id] = 0.0;

new iActivator= UTIL_RemoveCorpses(id, DEAD_BODY_CLASSNAME);

if(is_user_connected(iActivator))
{
UTIL_NotifyClient(iActivator, print_team_red, "RT_DISCONNECTED");
UTIL_ResetEntityThink(g_eForwards[ReviveCancelled], NULLENT, id, iActivator, MODE_NONE);
}
}

public CSGameRules_CleanUpMap_Post()
{
UTIL_RemoveCorpses(0, DEAD_BODY_CLASSNAME);
}

public CBasePlayer_UseEmpty_Pre(const iActivator)
{
if(~get_entvar(iActivator, var_flags) & FL_ONGROUND)
return;

static iEnt;
iEnt = NULLENT;

static Float:vPlOrigin[3], Float:vEntOrigin[3];
get_entvar(iActivator, var_origin, vPlOrigin);

while((iEnt = rg_find_ent_by_class(iEnt, DEAD_BODY_CLASSNAME)) > 0)
{
if(!is_nullent(iEnt))
{
get_entvar(iEnt, var_vuser4, vEntOrigin);

if(ExecuteHam(Ham_FVecInViewCone, iActivator, vEntOrigin) && vector_distance(vPlOrigin, vEntOrigin) < g_eCvars[SEARCH_RADIUS])
{
Corpse_Use(iEnt, iActivator);
return;
}
}
}
}

public Corpse_Use(const iEnt, const iActivator)
{
if(is_nullent(iEnt) || get_member_game(m_bRoundTerminating) || !ExecuteHam(Ham_IsPlayer, iActivator))
return;

static iPlayer;
iPlayer = get_entvar(iEnt, var_owner);

static TeamName:iActTeam, TeamName:iPlTeam, TeamName:iEntTeam;
iActTeam = get_member(iActivator, m_iTeam);
iPlTeam = get_member(iPlayer, m_iTeam);
iEntTeam = get_entvar(iEnt, var_team);

static modes_struct:eCurrentMode;
eCurrentMode = (iActTeam == iPlTeam) ? MODE_REVIVE : MODE_PLANT;

if(g_iPluginLoaded == INVALID_PLUGIN_ID && eCurrentMode == MODE_PLANT)
return;

if(iActTeam == TEAM_SPECTATOR || iPlTeam == TEAM_SPECTATOR)
return;

if(iEntTeam != iPlTeam)
{
UTIL_NotifyClient(iActivator, print_team_red, "RT_CHANGE_TEAM");
return;
}

if(get_entvar(iEnt, var_iuser1))
{
UTIL_NotifyClient(iActivator, print_team_red, "RT_ACTIVATOR_EXISTS");
return;
}

if(!is_user_alive(iActivator))
{
UTIL_ResetEntityThink(g_eForwards[ReviveCancelled], iEnt, iPlayer, iActivator, eCurrentMode);
return;
}

new fwRet;

ExecuteForward(g_eForwards[ReviveStart], fwRet, iEnt, iPlayer, iActivator, eCurrentMode);

if(fwRet == PLUGIN_HANDLED)
{
UTIL_ResetEntityThink(g_eForwards[ReviveCancelled], iEnt, iPlayer, iActivator, eCurrentMode);
return;
}

static Float:flGameTime;
flGameTime = get_gametime();

if(g_flLastUse[iActivator] > flGameTime)
{
UTIL_NotifyClient(iActivator, print_team_red, "RT_ANTI_FLOOD");
UTIL_ResetEntityThink(g_eForwards[ReviveCancelled], iEnt, iPlayer, iActivator, eCurrentMode);
return;
}

g_flLastUse[iActivator] = flGameTime + g_eCvars[ANTIFLOOD_TIME];

UTIL_NotifyClient(iActivator, print_team_blue, eCurrentMode == MODE_REVIVE ? "RT_TIMER_REVIVE" : "RT_TIMER_PLANT", iPlayer);

g_iTimeUntil[iActivator] = 0;

set_entvar(iEnt, var_iuser1, iActivator);
set_entvar(iEnt, var_fuser1, flGameTime + g_eCvars[REVIVE_TIME]);
set_entvar(iEnt, var_fuser3, g_eCvars[REVIVE_TIME]);
set_entvar(iEnt, var_nextthink, flGameTime + 0.1);
}

public Corpse_Think(const iEnt)
{
if(is_nullent(iEnt))
return;

static iPlayer, iActivator;
iPlayer = get_entvar(iEnt, var_owner);
iActivator = get_entvar(iEnt, var_iuser1);

static TeamName:iActTeam, TeamName:iPlTeam, TeamName:iEntTeam;
iActTeam = get_member(iActivator, m_iTeam);
iPlTeam = get_member(iPlayer, m_iTeam);
iEntTeam = get_entvar(iEnt, var_team);

static modes_struct:eCurrentMode;
eCurrentMode = (iActTeam == iPlTeam) ? MODE_REVIVE : MODE_PLANT;

if(iEntTeam != iPlTeam)
{
UTIL_NotifyClient(iActivator, print_team_red, "RT_CHANGE_TEAM");
return;
}

new Float:flGameTime = get_gametime();

if(g_eCvars[CORPSE_TIME] && !iActivator && get_entvar(iEnt, var_fuser4) < flGameTime)
{
UTIL_RemoveCorpses(iPlayer, DEAD_BODY_CLASSNAME);
return;
}

if(~get_entvar(iActivator, var_button) & IN_USE)
{
UTIL_NotifyClient(iActivator, print_team_red, eCurrentMode == MODE_REVIVE ? "RT_CANCELLED_REVIVE" : "RT_CANCELLED_PLANT");
UTIL_ResetEntityThink(g_eForwards[ReviveCancelled], iEnt, iPlayer, iActivator, eCurrentMode);
return;
}

static Float:flTimeUntil[2];
flTimeUntil[0] = Float:get_entvar(iEnt, var_fuser1);
flTimeUntil[1] = Float:get_entvar(iEnt, var_fuser3);

g_iTimeUntil[iActivator]++;

if(g_iTimeUntil[iActivator] == 10)
{
flTimeUntil[1] -= 1.0;

if(!is_user_alive(iActivator))
{
UTIL_ResetEntityThink(g_eForwards[ReviveCancelled], iEnt, iPlayer, iActivator, eCurrentMode);
return;
}

new fwRet;

ExecuteForward(g_eForwards[ReviveLoop_Pre], fwRet, iEnt, iPlayer, iActivator, flTimeUntil[1], eCurrentMode);

if(fwRet == PLUGIN_HANDLED)
{
UTIL_ResetEntityThink(g_eForwards[ReviveCancelled], iEnt, iPlayer, iActivator, eCurrentMode);
return;
}
}

if(flGameTime > flTimeUntil[0])
{
new modes_struct:iMode = get_entvar(iEnt, var_iuser3);

if(eCurrentMode == MODE_REVIVE && iMode != MODE_PLANT)
{
UTIL_NotifyClient(iActivator, print_team_blue, "RT_REVIVE", iPlayer);
UTIL_NotifyClient(iPlayer, print_team_blue, "RT_REVIVED", iActivator);

rg_round_respawn(iPlayer);

static Float:fOrigin[3];
get_entvar(iActivator, var_origin, fOrigin);
set_entvar(iPlayer, var_flags, get_entvar(iPlayer, var_flags) | FL_DUCKING);

engfunc(EngFunc_SetSize, iPlayer, Float:{-16.000000, -16.000000, -18.000000}, Float:{16.000000, 16.000000, 32.000000});
engfunc(EngFunc_SetOrigin, iPlayer, fOrigin);

UTIL_RemoveCorpses(iPlayer, DEAD_BODY_CLASSNAME);
}

if(!is_user_alive(iActivator))
{
UTIL_ResetEntityThink(g_eForwards[ReviveCancelled], iEnt, iPlayer, iActivator, eCurrentMode);
return;
}

ExecuteForward(g_eForwards[ReviveEnd], _, iEnt, iPlayer, iActivator, eCurrentMode);

return;
}

if(g_iTimeUntil[iActivator] == 10)
{
if(!is_user_alive(iActivator))
{
UTIL_ResetEntityThink(g_eForwards[ReviveCancelled], iEnt, iPlayer, iActivator, eCurrentMode);
return;
}

ExecuteForward(g_eForwards[ReviveLoop_Post], _, iEnt, iPlayer, iActivator, flTimeUntil[1], eCurrentMode);

g_iTimeUntil[iActivator] = 0;
}

set_entvar(iEnt, var_fuser3, flTimeUntil[1]);
set_entvar(iEnt, var_nextthink, flGameTime + 0.1);
}

public MessageHook_ClCorpse()
{
if(get_member_game(m_bRoundTerminating))
return PLUGIN_HANDLED;

enum
{
arg_model = 1,
arg_body = 10,
arg_id = 12
};

static iPlayer;
iPlayer = get_msg_arg_int(arg_id);

static TeamName:iPlTeam;
iPlTeam = get_member(iPlayer, m_iTeam);

if(iPlTeam == TEAM_SPECTATOR)
return PLUGIN_HANDLED;

static iEnt;
iEnt = rg_create_entity("info_target");

if(is_nullent(iEnt))
return PLUGIN_HANDLED;

new fwRet;

ExecuteForward(g_eForwards[CreatingCorpseStart], fwRet, iEnt, iPlayer);

if(fwRet == PLUGIN_HANDLED)
{
set_entvar(iEnt, var_flags, FL_KILLME);
set_entvar(iEnt, var_nextthink, -1.0);
return PLUGIN_HANDLED;
}

static szTemp[MAX_RESOURCE_PATH_LENGTH], szModel[MAX_RESOURCE_PATH_LENGTH];
get_msg_arg_string(arg_model, szTemp, charsmax(szTemp));
formatex(szModel, charsmax(szModel), "models/player/%s/%s.mdl", szTemp, szTemp);

engfunc(EngFunc_SetModel, iEnt, szModel);

set_entvar(iEnt, var_classname, DEAD_BODY_CLASSNAME);
set_entvar(iEnt, var_body, get_msg_arg_int(arg_body));
set_entvar(iEnt, var_sequence, get_entvar(iPlayer, var_sequence));
set_entvar(iEnt, var_frame, 255.0);
set_entvar(iEnt, var_skin, get_entvar(iPlayer, var_skin));
set_entvar(iEnt, var_owner, iPlayer);
set_entvar(iEnt, var_team, iPlTeam);

static Float:fOrigin[3];
get_entvar(iPlayer, var_origin, fOrigin);
engfunc(EngFunc_SetOrigin, iEnt, fOrigin);

static Float:fAngles[3];
get_entvar(iPlayer, var_angles, fAngles);
set_entvar(iEnt, var_angles, fAngles);

engfunc(EngFunc_GetBonePosition, iEnt, 2, fOrigin, fAngles);
set_entvar(iEnt, var_vuser4, fOrigin);

set_entvar(iEnt, var_fuser2, g_eCvars[SEARCH_RADIUS]);

SetThink(iEnt, "Corpse_Think");

if(g_eCvars[CORPSE_TIME])
set_entvar(iEnt, var_fuser4, get_gametime() + g_eCvars[CORPSE_TIME]);

static szOriginData[3];

for(new i; i < 3; i++)
szOriginData[i] = floatround(fOrigin[i]);

szOriginData[2] += 20;

ExecuteForward(g_eForwards[CreatingCorpseEnd], _, iEnt, iPlayer, PrepareArray(szOriginData, sizeof(szOriginData)));

return PLUGIN_HANDLED;
}

public RegisterCvars()
{
bind_pcvar_float(create_cvar(
"rt_revive_time",
"3.0",
FCVAR_NONE,
"Duration of the player's resurrection(in seconds)",
true,
1.0),
g_eCvars[REVIVE_TIME]
);
bind_pcvar_float(create_cvar(
"rt_revive_antiflood",
"3.0",
FCVAR_NONE,
"Duration of anti-flood resurrection(in seconds)",
true,
1.0),
g_eCvars[ANTIFLOOD_TIME]
);
bind_pcvar_float(create_cvar(
"rt_corpse_time",
"30.0",
FCVAR_NONE,
"Duration of a corpse's life (in seconds). If you set it to 0, the corpse lives until the end of the round.",
true,
0.0),
g_eCvars[CORPSE_TIME]
);
bind_pcvar_float(create_cvar(
"rt_search_radius",
"64.0",
FCVAR_NONE,
"Search radius for a corpse",
true,
1.0),
g_eCvars[SEARCH_RADIUS]
);
}
--
 
В этой теме было размещено решение! Перейти к решению.
Сообщения
3,582
Реакции
1,570
Помог
137 раз(а)
Kobra, тогда почему ты создаёшь тему с ошибкой старой версии, а не последней?
 
Сообщения
290
Реакции
28
Помог
2 раз(а)
Kobra, тогда почему ты создаёшь тему с ошибкой старой версии, а не последней?
Cause I didn't look at this section that way. I thought only small plugin errors can be fixed here,since that's a modular plugin with a bug I was waiting for the creator to fix it...version 0.11 is working fine but from time to time that error log appears.
 
Сообщения
892
Реакции
149
Помог
25 раз(а)
Обнови версию до последней, либо сделай проверку:
C++:
if(!is_user_connected(iPlayer)) 
    return;
 
Статус
В этой теме нельзя размещать новые ответы.

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

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