Skocz do zawartości

  • Zaloguj korzystając z Facebooka Zaloguj korzystając z Twittera Zaloguj przez Steam Zaloguj poprzez Google      Logowanie »   
  • Rejestracja

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.

  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

[TF2] Demoman's Dynamite Pack [1.1]


  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
Brak odpowiedzi do tego tematu

#1 Adminek AMXX.PL

    Admin :)

  • Bot

Reputacja: 156
Profesjonalista

  • Postów:7179
  • Lokalizacja:AMXX.PL
Offline

Napisano 19.07.2015 18:09

<div><div align="center"><br /><a href="http://i.imgur.com/7yUqSX3.png"target="_blank"><img src="http://i.imgur.com/Vh9GfC2.png" border="0" alt="" /></a><br /><font size="3"><b><u>Meet the Dynamite Pack</u></b></font><br /></div>Welcome to the Demoman's Dynamite Pack. This plugin is a recreation of the scrapped Dynamite Pack weapon seen in early Team Fortress 2 trailers. This plugin started its life as a modification of WildTurkey's Clusterbomb plugin.<br /><br />This plugin strives to be an accurate recreation of the Dynamite Pack, and that is reflected in various places. Most default ConVar values <i>(such as damage magnitude and radius)</i> are taken directly from the 2008 TF2 source code leak which featured a highly complete tf_weapon_grenade_mirv.cpp file. The textures used for the Dynamite Pack model are also legitimately made by Valve.<br /><br />The source code has a heavy amount of commenting in it as I decided to leave little tidbits of info about certain things in the code for anyone who decides to venture in there. I've also left all the code fully expanded, except in certain places <i>(like the &quot;public ConVarChanged&quot; function where I've minimized the code down a bit)</i><br /><br /><br /><font size="3"><b><u>Commands</u></b></font><br />There's only one command in this plugin, and it's a normal publicly-accessible client command, so everyone has access to it.<br /><ul><li><b>sm_grenade2</b> - Throws a Dynamite Pack. Command only works for the Demoman class.</li>
</ul><br />Want to restrict who has access? Simply head over to your server's &quot;admin_overrides.cfg&quot; file and add in the following:<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">&quot;sm_grenade2&quot;&nbsp; &quot;&lt;add flag here&gt;&quot;</code><hr />
</div>Just replace the &quot;&lt;add flag here&gt;&quot; bit with whatever flag you want to restrict it to, i.e. &quot;z&quot; or &quot;b&quot;.<br /><br /><br /><font size="3"><b><u>Convars</u></b></font><br />There's a lot of convars in this plugin, so let's get started! Thankfully, this plugin runs AutoExecConfig, so everything is stored in a CFG file. Why did I put in so many ConVars? Because I often dislike being asked to add/change things after I've released a plugin, so I figured I'd add in a ton of ConVars and make this plugin incredibly customizable.<br /><div style="margin: 5px;">
<div class="smallfont" style="margin-bottom: 2px;">
<b>List of ConVars</b> <input value="Show" style="margin: 0px; padding: 0px; width: 45px; font-size: 10px;" onclick="if(this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != 'inline')
{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'inline'; this.innerText = ''; this.value = 'Hide'; }
else
{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value='Show'; }" type="button">
</div>
<div class="alt2" style="border: 1px inset; padding: 6px;">
<div class="spoiler" style="display: none;"><br /><ul><li><b>sm_mirvdemo_version</b> - Standard version convar. Do not touch!</li>
<li><b>sm_mirvdemo_spawnamount</b> - Number of Dynamite Packs the Demoman spawns with?<ul><li><b>Default:</b> 2</li>
<li><b>Minimum:</b> 0</li>
<li><b>Maximum:</b> 10</li>
</ul></li>
<li><b>sm_mirvdemo_pack_throwspeed</b> - How fast is the Dynamite Pack is thrown from the player?<ul><li><b>Default:</b> 500.0</li>
<li><b>Minimum:</b> 0.0</li>
<li><b>Maximum:</b> 5000.0</li>
</ul></li>
<li><b>sm_mirvdemo_pack_detdelay</b> - Time (in seconds) before the Dynamite Pack explodes?<ul><li><b>Default:</b> 3.0</li>
<li><b>Minimum:</b> 1.0</li>
<li><b>Maximum:</b> 30.0</li>
</ul></li>
<li><b>sm_mirvdemo_pack_radius</b> - Explosion radius of the main pack explosion.<ul><li><b>Default:</b> 198.0</li>
<li><b>Minimum:</b> 0.0</li>
<li><b>Maximum:</b> 500.0</li>
</ul></li>
<li><b>sm_mirvdemo_pack_damage</b> - Damage magnitude of the main pack explosion.<ul><li><b>Default:</b> 180.0</li>
<li><b>Minimum:</b> 0.0</li>
<li><b>Maximum:</b> 500.0</li>
</ul></li>
<li><b>sm_mirvdemo_stickamount</b> - How many sticks does the Dynamite Pack spawn?<ul><li><b>Default:</b> 5</li>
<li><b>Minimum:</b> 1</li>
<li><b>Maximum:</b> 10</li>
</ul></li>
<li><b>sm_mirvdemo_stick_detdelay</b> - Time (in seconds) before the Dynamite sticks explode?<ul><li><b>Default:</b> 2.0</li>
<li><b>Minimum:</b> 1.0</li>
<li><b>Maximum:</b> 30.0</li>
</ul></li>
<li><b>sm_mirvdemo_stick_angcalcmode</b> - Which stick angle calculation method should be used?<ul><li><b>Default:</b> 1</li>
<li><b>0:</b> Use values taken from sm_mirvdemo_stick_vertvel, sm_mirvdemo_stick_spreadvel and sm_mirvdemo_stick_variation</li>
<li><b>1:</b> Use hardcoded values taken from the 2008 TF2 source code leak</li>
</ul></li>
<li><b>sm_mirvdemo_stick_vertvel</b> - How fast sticks are thrown in the air when spawned.<ul><li><b><font color="Red">Requires sm_mirvdemo_angcalcmode to be set to 0</font></b></li>
<li><b>Default:</b> 90.0</li>
<li><b>Minimum:</b> 20.0</li>
<li><b>Maximum:</b> 500.0</li>
</ul></li>
<li><b>sm_mirvdemo_stick_spreadvel</b> - How fast sticks spread out after they are spawned.<ul><li><b><font color="Red">Requires sm_mirvdemo_angcalcmode to be set to 0</font></b></li>
<li><b>Default:</b> 50.0</li>
<li><b>Minimum:</b> 20.0</li>
<li><b>Maximum:</b> 500.0</li>
</ul></li>
<li><b>sm_mirvdemo_stick_variation</b> - Vertical and spread speeds will be varied between 1X and this value.<ul><li><b><font color="Red">Requires sm_mirvdemo_angcalcmode to be set to 0</font></b></li>
<li><b>Default:</b> 2.0</li>
<li><b>Minimum:</b> 1.0</li>
<li><b>Maximum:</b> 5.0</li>
</ul></li>
<li><b>sm_mirvdemo_stick_damage</b> - Damage magnitude of each stick.<ul><li><b>Default:</b> 180.0</li>
<li><b>Minimum:</b> 0.0</li>
<li><b>Maximum:</b> 500.0</li>
</ul></li>
<li><b>sm_mirvdemo_stick_radius</b> - Explosion radius of each stick.<ul><li><b>Default:</b> 198.0</li>
<li><b>Minimum:</b> 0.0</li>
<li><b>Maximum:</b> 500.0</li>
</ul></li>
<li><b>sm_mirvdemo_bluskinversion</b> - Which BLU texture should be used? (0 - Valve-made, 1 - Custom-made by me)<ul><li><b>Default:</b> 0</li>
<li><b>0:</b> Valve-made BLU texture (just a blue stripe on the pack strap and on the stick)</li>
<li><b>1:</b> Custom-made BLU texture created by me, changes the red color of the sticks and pack to blue.</li>
</ul></li>
<li><b>sm_mirvdemo_trailparticles</b> - Enable/disable pack-attached trail particles<ul><li><b>Default:</b> 1</li>
<li><b>0:</b> Disabled</li>
<li><b>1:</b> Enabled</li>
</ul></li>
<li><b>sm_mirvdemo_hud_xpos</b> - X position for the HUD text<ul><li><b>Default:</b> 0.75</li>
<li><b>Minimum:</b> -1.0</li>
<li><b>Maximum:</b> 1.0</li>
</ul></li>
<li><b>sm_mirvdemo_hud_ypos</b> - Y position for the HUD text<ul><li><b>Default:</b> 0.85</li>
<li><b>Minimum:</b> -1.0</li>
<li><b>Maximum:</b> 1.0</li>
</ul></li>
<li><b>sm_mirvdemo_hud_red</b> - Red value of HUD text<ul><li><b>Default:</b> 255</li>
<li><b>Minimum:</b> 0</li>
<li><b>Maximum:</b> 255</li>
</ul></li>
<li><b>sm_mirvdemo_hud_green</b> - Green value of HUD text<ul><li><b>Default:</b> 255</li>
<li><b>Minimum:</b> 0</li>
<li><b>Maximum:</b> 255</li>
</ul></li>
<li><b>sm_mirvdemo_hud_blue</b> - Blue value of HUD text<ul><li><b>Default:</b> 255</li>
<li><b>Minimum:</b> 0</li>
<li><b>Maximum:</b> 255</li>
</ul></li>
<li><b>sm_mirvdemo_hud_alpha</b> - Alpha value of HUD text<ul><li><b>Default:</b> 255</li>
<li><b>Minimum:</b> 0</li>
<li><b>Maximum:</b> 255</li>
</ul></li>
<li><b>sm_mirvdemo_togglegfe</b> - Enable/disable SetEntityGravity, m_flFriction and m_flElasticity values from the leaked source code on the main Dynamite Pack entity.<ul><li><b>Default:</b> 0</li>
<li><b>0:</b> Disabled</li>
<li><b>1:</b> Enabled</li>
</ul></li>
</ul></div>
</div>
</div><br /><br /><br /><font size="3"><b><u>Installation Instructions</u></b></font><ol style="list-style-type: decimal"><li>Download tf2_mtdp.smx and put it into &quot;addons/sourcemod/plugins&quot;</li>
<li>Download TF2DynamitePackFiles.zip</li>
<li>Extract the files inside the &quot;Server&quot; folder into your server's &quot;tf&quot; folder</li>
<li>Extract the files inside the &quot;FastDL&quot; folder into your server's fastdl &quot;tf&quot; folder.</li>
<li>Run the plugin</li>
<li>???</li>
<li>Profit!</li>
</ol><br /><br /><font size="3"><b><u>Version History</u></b></font><br /><div style="margin: 5px;">
<div class="smallfont" style="margin-bottom: 2px;">
<b>Version History</b> <input value="Show" style="margin: 0px; padding: 0px; width: 45px; font-size: 10px;" onclick="if(this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != 'inline')
{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'inline'; this.innerText = ''; this.value = 'Hide'; }
else
{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value='Show'; }" type="button">
</div>
<div class="alt2" style="border: 1px inset; padding: 6px;">
<div class="spoiler" style="display: none;"><br /><div style="margin: 5px;">
<div class="smallfont" style="margin-bottom: 2px;">
<b>1.0</b> <input value="Show" style="margin: 0px; padding: 0px; width: 45px; font-size: 10px;" onclick="if(this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != 'inline')
{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'inline'; this.innerText = ''; this.value = 'Hide'; }
else
{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value='Show'; }" type="button">
</div>
<div class="alt2" style="border: 1px inset; padding: 6px;">
<div class="spoiler" style="display: none;"><ul><li>Initial release</li>
</ul></div>
</div>
</div><br /><div style="margin: 5px;">
<div class="smallfont" style="margin-bottom: 2px;">
<b>1.1</b> <input value="Show" style="margin: 0px; padding: 0px; width: 45px; font-size: 10px;" onclick="if(this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != 'inline')
{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'inline'; this.innerText = ''; this.value = 'Hide'; }
else
{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value='Show'; }" type="button">
</div>
<div class="alt2" style="border: 1px inset; padding: 6px;">
<div class="spoiler" style="display: none;"><ul><li>Removed commented-out events that weren't used in final version</li>
<li>Changed url field in myinfo</li>
<li>Added new convar &quot;sm_mirvdemo_togglegfe&quot;, allowing you to enable/disable the SetEntityGravity, m_flFriction and m_flElasticity values that are set on the main pack. These values were retrieved from the leaked source code, but I couldn't tell if they made any difference or not, so I figured I'd add an enable/disable convar for them.</li>
</ul></div>
</div>
</div><br /></div>
</div>
</div><br /><br /><br /><font size="3"><u><b>Credits</b></u></font><ul><li><b>WildTurkey</b> - Without his cluster bomb plugin, I never would've started working on this</li>
<li><b>Whoever leaked the 2008 TF2 source code</b> - Got a lot of information on the various values and specifications from the source code</li>
<li><b>Everyone here</b> - Over the past year and a half I don't know how many help threads I've posted that were secretly me getting help for this plugin, so I'll just thank everyone on the forums for being awesome and being helpful.</li>
</ul><br /><br /><font size="3"><b><u>Things I want to add</u></b></font><br /><font size="1"><i><u>(but am too much of a noob coder to figure out)</u></i></font><ul><li>A way to &quot;charge&quot; the &quot;throw&quot; by holding down a button. Longer you hold, farther you throw, to a point. Someone told me to use GetEngineTime but I have no idea what the heck that is or how to do it</li>
<li>A HUD-text charge bar for when you &quot;prime&quot; the throw. HUD text is simple, but because it's part of the first entry, I'm not sure of how to make HUD text act like its showing a charge-up meter.</li>
<li>A way to hook into the existing &quot;+grenade2&quot; and &quot;-grenade2&quot; commands that go unused in TF2. I've tried this with command listeners, but it didn't work. Not sure why, so I gave up on it.</li>
<li>A way to make the pack emanate from the right side of the screen and move towards the center (to simulate actual throwing). Right now, the pack emanates from the center of the screen and is thrown in a straight line.</li>
<li>Alongside the above, I'd like to have a way to trigger the Demoman's spell-throwing animation when he throws the pack in both first and third person. Maybe also have the pack emanate from somewhere around where the Demoman's hand is when he throws the pack.</li>
</ul><br /><br /><font size="3"><b><u>Problems? Suggestions?</u></b></font><br />There shouldn't be any errors or bugs in this plugin, but if you do happen to find any, please let me know on this thread and I'll try my best to correct the issues!<br /><br />And as well, even though this plugin is highly customizable, if you have any suggestions for ways to rework my code, or suggestions of new things to add, let me know!<br /><br />Lastly, if you think I should create convars to control other things in this plugin, let me know!<br /><br /><br /><font size="3"><b><u>More grenade plugins?</u></b></font><br />I was originally planning on making a plugin for all the other grenades (Frag, Bear Trap, Napalm, etc) but since there was no actual code or values or other info on the other grenades, I've given up on that idea. <b>However, I have created a Frag Grenade plugin that I will be releasing soon...</b><br /><br /><font size="2"><div align="center"><i><b>Views before 1.1:</b> 4</i></div></font></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...ckFiles.zip</a>(629.2 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...29"><strong>GetPlugin</strong></a> or
<a href="https://forums.allie...1437332095">GetSource</a> (tf2_mtdp.sp - 34.9 KB)


</td>
</tr>
</table>
</fieldset>


</div>

Wyświetl pełny artykuł




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych