<div>Since nobody decided to publish a health bar plugin for CS:S I decided to do one. I have drawn the health bar sprites myself using PAINT.NET with VTF plugin. VMT uses "Sprite" with proper sprite orientation so that the health bar looks 2D from any angle (looks 3D and become thinner vmt specify it as "unlitgeneric" or other. Health bar changes length and colour at 5% health interval Added two cvars to make it more customizable. <br /><br /><u><b>Cvars:</b></u><br /><div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px">Code:</div>
<hr /><code style="margin:0px" dir="ltr" style="text-align:left"><font size="2"><b>sm_healthbar_time 5.0</b> // Time before health bar disappear when player receive damage. Default = 5.0, Always show health bar = 0<br /><b>sm_healthbar_render 1</b> /* Health bar rendermode. <br />Default = 1, you can change it to other mode to see how the health bar is displayed in different environment.<br />Other settings includes integers from 0 to 10 (see: <a href="https://developer.va...i/Render_Modes"target="_blank">https://developer.va...ender_Modes</a>)*/</font></code><hr />
</div><u><b>How it works:</b></u><br />If <b>sm_healthbar_time</b> is set to 0, healthbar will <u>always displayed</u> above player head until death.<br />If <b>sm_healthbar_time</b> is non-zero, healthbar will <u>only appear when player takes damage and disappears after the set value</u>. Continuous damage will reset the timer.<br /><br />If any of the cvars is changed during game:<ul><li>Set to 0: All healthbar would be removed.</li>
<li>Set to non-zero: All health bar will be recreated.</li>
</ul><br /><b><u>Installation:</u></b><ol style="list-style-type: decimal"><li>Place sm_healthbar.smx in cstrikeaddonssourcemodplugins</li>
<li>Extract the sprites to your cstrikematerials folder</li>
<li>Done</li>
</ol><br /><b><u>Limitations:</u></b><br />Does not work with other health regeneration mod or when player health is changed through commands like SetEntData since health change is detect through only the "player_hurt" event. Sorry, will try to implement.<br /><br /><u><b>Bugs:</b></u><ul><li>If you decide to change cvar during gameplay, health bar will shift position if player is crouching or jumping. Therefore Recommend you to place the cvars in server.cfg and not change them during game play.</li>
</ul>Thats all so far. I have tried testing it over and over and did checks like if player is alive, is health bar already created ... etc. So tel me if you find any bugs other than stated in my limitations above! :)<br /><b><u><br />If anyone can test if this plugin works for other games please tell me thanks!!!</u></b></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/zip.gif"alt="File Type: zip" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>
<a href="https://forums.allie...aterial.zip</a>(14.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...11"><strong>GetPlugin</strong></a> or
<a href="https://forums.allie...1482552597">GetSource</a> (sm_healthbar.sp - 9.2 KB)
</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

[CS:S/CS:GO] Health Bar V1.0
Temat rozp. Adminek AMXX.PL, 24.12.2016 05:10
Brak odpowiedzi do tego tematu
Użytkownicy przeglądający ten temat: 0
0 użytkowników, 0 gości, 0 anonimowych