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

[ANY] Favorite Connections (v1.0, 2015-1-27)


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

Napisano 28.01.2015 01:26

<!-- BEGIN TEMPLATE: postbit_external -->
<div><div align="center"><b><font size="7"><font face="Arial Black">Favorite Connections</font></font></b><br /><font face="Arial"><font size="3">Special thanks to <a href="https://forums.allie...r.php?u=250867"target="_blank">Wolvan</a> for the example and helping me with forwards.</font></font></div><br /><br /><br /><br /><font size="4"><b>Description:</b></font><br />Small plugin for developers to use as an API using the forward &quot;ClientConnectedViaFavorites&quot; to detect when a player connects through his/her favorites.<br /><b><font color="Red">Please note that this plugin ALONE literally does nothing and only serves as an API for developers.</font></b><br />Side note: this is my first plugin to publish on here and I am still pretty new to Sourcepawn. Any suggestions are more than welcome, but please be nice! :)<br /><br /><font size="4"><b>Dependencies:</b></font><br />Due to the use of &quot;cl_connectmethod&quot;, this plugin only works on the following games:<ul><li>Team Fortress 2</li>
<li>Day of Defeat: Source</li>
<li>Counter-Strike: Source</li>
<li>Half Life 2: Deathmatch</li>
</ul><br /><font size="4"><b>CVARS:</b></font><ul><li><b>favoriteconnections_version</b> 1.0 - Plugin version</li>
<li><b>favoriteconnections_enable [0/1]</b> - (Default = 1) Enable plugin = 1 Disable plugin = 0</li>
</ul><br /><font size="4"><b>Forward:</b></font><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">forward Action:ClientConnectedViaFavorites(client);</code><hr />
</div>
<!-- END TEMPLATE: bbcode_code_printable --><font size="4"><b>Example:</b></font><br />(attached below as favoriteconnections_exmaple)<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">public Action:ClientConnectedViaFavorites(client)<br />{<br />&nbsp; &nbsp; &nbsp; &nbsp; new String:name[MAX_NAME_LENGTH];<br />&nbsp; &nbsp; &nbsp; &nbsp; GetClientName(client, name, sizeof(name));<br />&nbsp; &nbsp; &nbsp; &nbsp; PrintToChatAll(&quot;%s joined this server through his/her favorites! Thank you!&quot;, name);<br />&nbsp; &nbsp; &nbsp; &nbsp; return Plugin_Continue;<br />}</code><hr />
</div>
<!-- END TEMPLATE: bbcode_code_printable -->Please note that the callback on the end is Plugin_Continue!<br /><br /><font size="4"><b>Plugins That Use This Plugin:</b></font><br />(none yet)<br /><br /><font size="4"><b>Installation:</b></font><ol style="list-style-type: decimal"><li>favoriteconnections.smx -&gt; (game)/addons/sourcemod/plugins/</li>
<li>(for developers) favoriteconnections.sp -&gt; (game)/addons/sourcemod/scripting/</li>
<li>Same instructions apply to favoriteconnections_example.smx if you're wanting to install that as well.</li>
</ol></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/sp.gif"alt="File Type: sp" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>


<a href="http://www.sourcemod...66"><strong>GetPlugin</strong></a> or
<a href="https://forums.allie...1422404753">GetSource</a> (favoriteconnections.sp - 1.7 KB)


</td>
</tr>
<!-- END TEMPLATE: postbit_attachment --><!-- BEGIN TEMPLATE: postbit_attachment -->
<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...67"><strong>GetPlugin</strong></a> or
<a href="https://forums.allie...1422404753">GetSource</a> (favoriteconnections_example.sp - 547 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