<div>This plugin creates a Call of Duty-esque projectile indicator for Stickybombs and Pipe Grenades!<br /><br /><u><b>since this plugin uses methodmaps, it requires SourceMod 1.7+ to compile;</b></u><br /><u>also, this plugin can also be modified to work in order games as so needed.</u><br /><br />cvars<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">projindic_enabled </span><span style="color: #DD0000">"1" </span><span style="color: #007700">: </span><span style="color: #0000BB">Enable Projectile Indicator plugin<br />projindic_grenades </span><span style="color: #DD0000">"1" </span><span style="color: #007700">: </span><span style="color: #0000BB">Enable the Projectile Indicator plugin to detect pipe grenades<br />projindic_stickies </span><span style="color: #DD0000">"1" </span><span style="color: #007700">: </span><span style="color: #0000BB">Enable the Projectile Indicator plugin to detect stickybombs<br /><br />projindic_grenaderadius </span><span style="color: #DD0000">"300.0" </span><span style="color: #007700">: </span><span style="color: #0000BB">Detection radius </span><span style="color: #007700">for </span><span style="color: #0000BB">pipe grenades in Hammer Units<br />projindic_stickyradius </span><span style="color: #DD0000">"300.0" </span><span style="color: #007700">: </span><span style="color: #0000BB">Detection radius </span><span style="color: #007700">for </span><span style="color: #0000BB">stickybombs in Hammer Units<br />projindic_detectfriendly </span><span style="color: #DD0000">"1" </span><span style="color: #007700">: </span><span style="color: #0000BB">Detect friendly projectiles
<br /></span>
</span>
</code><!-- php buffer end -->
</div>
</code>
<hr />
</div>
</div>Commands<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">User </span><span style="color: #007700">: </span><span style="color: #0000BB">sm_detect </span><span style="color: #007700">or </span><span style="color: #0000BB">sm_indic </span><span style="color: #007700">: </span><span style="color: #0000BB">Enables the indicator<br />Admins </span><span style="color: #007700">: </span><span style="color: #0000BB">sm_forcedetection </span><span style="color: #007700">or </span><span style="color: #0000BB">sm_forcedetect </span><span style="color: #007700"><@</span><span style="color: #0000BB">all</span><span style="color: #007700">|@</span><span style="color: #0000BB">red</span><span style="color: #007700">|@</span><span style="color: #0000BB">blue</span><span style="color: #007700">|@</span><span style="color: #0000BB">alive</span><span style="color: #007700">|@</span><span style="color: #0000BB">etc</span><span style="color: #007700">.>
<br /></span><span style="color: #0000BB"></span>
</span>
</code><!-- php buffer end -->
</div>
</code>
<hr />
</div>
</div><font color="Magenta">Considering how expensive the code is to run 100% perfectly, ANY optimization tips are welcome.<br />BEFORE you tell me your optimization tips, I already tried using SDKHooks on the projectiles themselves, hooking them to Think.<br /><br />It worked but it wasn't updating fast enough like the current expensive method. The prior expensive method was hooking SDKHooks ThinkPost on clients and using FindEntityByClassname2; it worked but the plugin would unload itself after detecting too many stickybombs and grenades xD.<br /><br />So I changed it to a 0.1 second timer which updates slow but not as slow as my first optimization attempt by hooking the projectiles which ONLY worked when I hooked them to Think after hooking their SpawnPost which I used to hook Think from...</font><br /><br />BitBucket Repo -> <a href="https://bitbucket.or...e-view-default"target="_blank">clickme!</a></div>
<br /> <div style="padding:6px">
<fieldset class="fieldset">
<legend>Attached Files</legend>
<table cellpadding="0" cellspacing="3" border="0">
<tr>
<td><img class="inlineimg" src="https://forums.allie...attach/smx.gif"alt="File Type: smx" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>
<a href="https://forums.allie...etector.smx</a>(9.8 KB)
</td>
</tr><tr>
<td><img class="inlineimg" src="https://forums.allie.../attach/sp.gif"alt="File Type: sp" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>
<a href="http://www.sourcemod...65"><strong>GetPlugin</strong></a> or
<a href="https://forums.allie...1452041498">GetSource</a> (projdetector.sp - 11.7 KB)
</td>
</tr><tr>
<td><img class="inlineimg" src="https://forums.allie...attach/inc.gif"alt="File Type: inc" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>
<a href="https://forums.allie...>macros.inc</a>(1,002 Bytes)
</td>
</tr>
</table>
</fieldset>
</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] Stickybomb and Pipe Indicator
Temat rozp. Adminek AMXX.PL, 06.01.2016 01:57
Brak odpowiedzi do tego tematu
Użytkownicy przeglądający ten temat: 0
0 użytkowników, 0 gości, 0 anonimowych