<div><font color="darkorange"><font size="7">TF2 RegenThink Hook</font></font><br /><br />The topic of hooking medics health regenration came up recently and I was kinda surprised nobody did a proper hook for this yet. I think nosoop brought up RegenThink in relation to that on the SM Discord, so thank you nosoop.<br /><br />As I didn't want this to be a "stupid" OnRegenThink hook, I dug into the decompile and reversed the function to give the most control possible. Since this plugin superceds the original function, I'm currently not sure how well this works with other RegenThink hooks, if at all.<br /><br /><font color="darkorange"><font size="5">Forward Summary</font></font><br /><br />The forwards are documented in the include.<br /><br /><div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px">PHP Code:</div>
<div class="alt2">
<hr />
<code style="white-space:nowrap">
<div dir="ltr" style="text-align:left;">
<!-- php buffer start --><code><span style="color: #000000">
<span style="color: #0000BB">Action TF2_OnRegenThinkPre</span><span style="color: #007700">(</span><span style="color: #0000BB">int client</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB">Action TF2_OnRegenThinkHealth</span><span style="color: #007700">(</span><span style="color: #0000BB">int client</span><span style="color: #007700">, </span><span style="color: #0000BB">float</span><span style="color: #007700">& </span><span style="color: #0000BB">regenHealthClass</span><span style="color: #007700">, </span><span style="color: #0000BB">float</span><span style="color: #007700">& </span><span style="color: #0000BB">regenHealthAttribs</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB">Action TF2_OnRegenThinkAmmo</span><span style="color: #007700">(</span><span style="color: #0000BB">int client</span><span style="color: #007700">, </span><span style="color: #0000BB">float</span><span style="color: #007700">& </span><span style="color: #0000BB">regenAmmoPercent</span><span style="color: #007700">, </span><span style="color: #0000BB">int</span><span style="color: #007700">& </span><span style="color: #0000BB">regenMetal</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB">void TF2_OnRegenThinkPost</span><span style="color: #007700">(</span><span style="color: #0000BB">int client</span><span style="color: #007700">, </span><span style="color: #0000BB">int regenHealth</span><span style="color: #007700">, </span><span style="color: #0000BB">float regenAmmo</span><span style="color: #007700">, </span><span style="color: #0000BB">int regenMetal</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB"></span>
</span>
</code><!-- php buffer end -->
</div>
</code>
<hr />
</div>
</div><font color="DarkOrange"><font size="5">Dependencies</font></font><br /><br />Requires <a href="https://github.com/F.../tf2attributes"target="_blank" rel="nofollow noopener">TF2 Attributes</a><br /><br /><font color="DarkOrange"><font size="5">Credits</font></font><br /><br />I want to thank nosoop for always having some insights or helpful reference code withing TF2 in their plugins. Also thanks to who ever asked for this in the SM Discord, I actually needed this for a personal project, but was too lazy to properly do this until now. Please open an issue if I forgot anyone :)<br /><br /><div align="center"><font size="7"><a href="https://github.com/DosMike/TF2-RegenThinkHook" target="_blank" rel="nofollow noopener">Available on GitHub</a></font></div></div>
Wyświetl pełny artykuł
Witamy w Nieoficjalnym polskim support'cie AMX Mod X
Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
|
Guest Message by DevFuse

[TF2] RegenThink Hook
Temat rozp. Adminek AMXX.PL, 03.11.2022 17:50
Brak odpowiedzi do tego tematu
Użytkownicy przeglądający ten temat: 0
0 użytkowników, 0 gości, 0 anonimowych