Skocz do zawartości

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

sm_weaponzoom


  • 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:7 488
  • Lokalizacja:AMXX.PL
Offline

Napisano 12.11.2013 02:03

<!-- BEGIN TEMPLATE: postbit_external -->
<div><font size="3">Weapon Zoom Sourcemod plugin for HL2 Death Match and possibly others (untested) by [foo] bar.</font><br /><br />This plugin adds enhanced zoom to weapons by changing the FOV of the player when a player uses secondary attack (ATTACK2) on a configured weapon, or through bound console commands. By default the plugin adds zoom to weapon_357, but can be added to other weapons that don't have an attack2 mode.<br /><br /><i>I have some changes in the works, but I'd love to hear feedback on how I can improve this plugin. It's coming up to my first year of Sourcemod coding and learning how to do things more effectively is important to me. Constructive criticism is appreciated.</i><br /><br />To reduce zoom, a player can hold down their &quot;walk&quot; (alt) key while pressing ATTACK2.<br /><br />Zoom is automatically turned off if toggle_zoom or suit zoom is turned on (for quick release).<br /><br />The plugin also registers three console commands: weaponzoom_in, weaponzoom_out, and weaponzoom_unzoom. This is particularly useful for binding mwheelup and mwheeldown to zoom in and out, and an extra mouse button unzoom completely. <br /><br />Example:<br /><br /><!-- BEGIN TEMPLATE: bbcode_code_printable -->
<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">bind mwheelup weaponzoom_in<br />bind mwheeldown weaponzoom_out<br />bind mouse5 weaponzoom_unzoom</code><hr />
</div>
<!-- END TEMPLATE: bbcode_code_printable -->The plugin also supports an &quot;ICU&quot; sound, played to a player who's being zoomed in on. This is fun for causing a bit of panic on players, especially in large sniper maps.<br /><br /><b>Installation</b><br /><ol style="list-style-type: decimal"><li>Upload plugins/sm_weaponzoom.smx into addons/sourcemod/plugins</li>
<li>Upload translations/sm_weaponzoom.phrases.txt into addons/sourcemod/translations</li>
<li>Upload html/sm_weaponzoom.html to a web server and set sm_weaponzoom_helpurl to that web address (see below)</li>
<li>Load plugin using sm plugins load sm_weaponzoom</li>
<li>If required, tweak cfg/sourcemod/plugin.sm_weaponzoom.cfg ; Reload using &quot;sm plugins reload sm_weaponzoom&quot; from srcds console.</li>
</ol><br /><b>Configuration</b><br /><br />On first load the plugin will generate cfg/sourcemod/plugin.sm_weaponzoom.cfg with default settings.<br /><br />Here's a brief list of cvar's and what they do:<br /><br /><!-- BEGIN TEMPLATE: bbcode_code_printable -->
<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"> sm_weaponzoom_weapons&nbsp; &nbsp; &nbsp; &nbsp; List of weapons to work on.&nbsp; ie: &quot;weapon_357 weapon_pistol&quot; etc. <br />&nbsp;sm_weaponzoom_helpurl&nbsp; &nbsp; &nbsp; &nbsp; Web address for in-game help.&nbsp; Set to nothing (&quot;&quot;) to disable.<br />&nbsp;sm_weaponzoom_cmdallzoom&nbsp; &nbsp; 1: allow weaponzoom_in and weaponzoom_out on all weapons. (default)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0: limited to weapons specified by sm_weapon_commands <br />&nbsp;sm_weaponzoom_icusound&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Sound to play to a player being zoomed in on (useful for teasing <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; players on large maps) <br />&nbsp;sm_weaponzoom_icusound_mintime&nbsp; Minimum number of seconds between targetted player hearing a <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sound from a stalking player</code><hr />
</div>
<!-- END TEMPLATE: bbcode_code_printable -->Out of box the zoom settings should be suitable for most servers. If you want tweak them, adjust the following cvar's to suite:<br /><br /><!-- BEGIN TEMPLATE: bbcode_code_printable -->
<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"> sm_weaponzoom_zoommax&nbsp; &nbsp; &nbsp; &nbsp; Maximum zoom levels (1-9) <br />&nbsp;sm_weaponzoom_zoomstart&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Starting &quot;zoom&quot; (FOV).&nbsp; High = less zoom, low = high zoom.&nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Range is 1-89.&nbsp; 35 or 40 is a good starting point. <br />&nbsp;sm_weaponzoom_zoomincrement&nbsp; &nbsp; &nbsp; Increment to take away from the FOV to increase zoom</code><hr />
</div>
<!-- END TEMPLATE: bbcode_code_printable -->Note: Perhaps counter-intuitively, the FOV is negated by sm_weapon_zoomincrement for each zoom increment performed by the player. If the FOV hits 0, the plugin unzooms the player (otherwise wierdness occurs). <br /><br /><b>In-game commands</b><br /><br />Player settings can be accessed either through the chat command: !settings (if you have this enabled) or !weaponzoom.<br /><br />Players can:<br /><ul><li>Turn it off completely</li>
<li>Set their own maximum zoom (up to the maximum set by sm_weaponzoom_maxzoom)</li>
<li>Disable attack2 (alt-fire) zooming (ie: if they only want to use the console commands through bindings instead)</li>
<li>Turn off hearing ICU</li>
<li>View in-game help</li>
<li>In-game help</li>
</ul><br />An html helpfile is included for you to display in-game help via !weaponzoom. (Download the zip for the html help file, it is not included in this post).<br /><br />Upload it to your fast download site, web server, or whatever, and set sm_weaponzoom_helpurl to the correct web address.<br /><br />By default the web address is set to a web server under the author's control but you are encouraged to host it yourself lest the in-game help is updated to a newer but incompatible version, or suddenly just stops working down the road.<br /><br /><b>Contributing</b><br /><br />This project is hosted on Github at <a href="https://github.com/f...l/sm_weaponzoom" target="_blank">https://github.com/f...aponzoom</a><br /><br />I'm happy to accept pull requests, bug reports, feature requests, etc through the Github project tracker.<br /><br /><b>Future changes TODO list</b><br /><br />At the moment there's a couple of changes I plan on implementing in a future release:<br /><ul><li>Losing the increment level and zoom level calculations in favour of an explicit list of zoom levels (fov) set by the sysop</li>
<li>Changing the player configuring for &quot;max zoom&quot; to allowing a player to set which zoom levels they want.</li>
</ul><br /><b>Credits</b><br /><br />Many thanks to Outlaw for prompting me to code this, and to Nyarlathotep, jono, Boogyman and anyone I forgot to mention for testing and suggesting feature improvements.<br /><br /><b>Donations</b><br /><br />If you enjoy this plugin please take a moment to donate! I happily accept donations!<br /><ul><li>Bitcoin (to: 1MLfRL82mrTLo9QzMc93AukyC78zH4fFhE)</li>
<li>Purchases of games on my wishlist</li>
<li>Paypal (contact me directly if you want to do this)</li>
<li>To my clan's server hosting account via <a href="http://vag-clan.tk/clanpay/" target="_blank">http://vag-clan.tk/c...anpay/</a></li>
</ul><br />Thanks, I hope you enjoy this plugin. And have fun sniping!<br /><br />{V@G}{DRB}[foo] bar</div>


<br /> <div style="padding:6px">








<fieldset class="fieldset">
<legend>Attached Files</legend>
<table cellpadding="0" cellspacing="3" border="0">
<!-- BEGIN TEMPLATE: postbit_attachment -->
<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...38;d=1384217875">sm_weaponzoom-1.6c.zip</a> (36.6 KB)


</td>
</tr>
<!-- END TEMPLATE: postbit_attachment --><!-- BEGIN TEMPLATE: postbit_attachment -->
<tr>
<td><img class="inlineimg" src="https://forums.allie...s/attach/sp.gif" alt="File Type: sp" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>


<a href="http://www.sourcemod...?file_id=127736"><strong>Get Plugin</strong></a> or
<a href="https://forums.allie...38;d=1384217889">Get Source</a> (sm_weaponzoom.sp - 20.9 KB)


</td>
</tr>
<!-- END TEMPLATE: postbit_attachment --><!-- BEGIN TEMPLATE: postbit_attachment -->
<tr>
<td><img class="inlineimg" src="https://forums.allie.../attach/txt.gif" alt="File Type: txt" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>


<a href="https://forums.allie...38;d=1384217895">sm_weaponzoom.phrases.txt</a> (434 Bytes)


</td>
</tr>
<!-- END TEMPLATE: postbit_attachment -->
</table>
</fieldset>


</div>

<!-- END TEMPLATE: postbit_external -->

Wyświetl pełny artykuł




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

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