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

[ANY] Block Spectators


  • 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 11.10.2015 20:44

<div><div align="center"><b><font size="5">[ANY] Block Spectators</font></b></div><br /><br /><b><font size="3">ABOUT<b></b>:</font></b><br />Basically, I formed this plugin based off of a request that I saw in the &quot;Plugin Requests&quot; section of this forum. After looking around I saw that there wasn't a publicly available plugin that does this (possibly because its so simple), but not everyone knows how to make SourceMod plugins so this is for them!<br /><br /><b><font size="3">INSTALLATION:</font></b><br />To install, simply download the newest version of the .smx file and place it into your /plugins/ folder.<br /><br /><b><font size="3">SOURCE CODE:</font></b><br /><div style="margin: 5px;">
<div class="smallfont" style="margin-bottom: 2px;">
<b>Spoiler</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;"><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"></span><span style="color: #FF8000">#include&nbsp;&lt;sourcemod&gt;<br /><br />#define&nbsp;PLUGIN_VERSION&nbsp;"1.0"<br /><br />#pragma&nbsp;semicolon&nbsp;1<br /><br /></span><span style="color: #007700">public&nbsp;</span><span style="color: #0000BB">Plugin</span><span style="color: #007700">:</span><span style="color: #0000BB">myinfo&nbsp;</span><span style="color: #007700">=<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">name&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"[ANY]&nbsp;Block&nbsp;Specatator"</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">author&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"Headline"</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">description&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"Makes&nbsp;the&nbsp;spectator&nbsp;team&nbsp;unjoinable."</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">version&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">PLUGIN_VERSION</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">url&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"http://www.michaelwflaherty.com"<br /></span><span style="color: #007700">};<br /><br />public&nbsp;</span><span style="color: #0000BB">OnPluginStart</span><span style="color: #007700">()<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">AddCommandListener</span><span style="color: #007700">(</span><span style="color: #0000BB">Command_JoinTeam</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"jointeam"</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//&nbsp;Hook&nbsp;Join&nbsp;Team<br /></span><span style="color: #007700">}<br /><br /><br />public&nbsp;</span><span style="color: #0000BB">Action</span><span style="color: #007700">:</span><span style="color: #0000BB">Command_JoinTeam</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;const&nbsp;</span><span style="color: #0000BB">String</span><span style="color: #007700">:</span><span style="color: #0000BB">command</span><span style="color: #007700">[],&nbsp;</span><span style="color: #0000BB">argc</span><span style="color: #007700">)&nbsp;&nbsp;<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">decl&nbsp;String</span><span style="color: #007700">:</span><span style="color: #0000BB">sTeamName</span><span style="color: #007700">[</span><span style="color: #0000BB">8</span><span style="color: #007700">];<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">GetCmdArg</span><span style="color: #007700">(</span><span style="color: #0000BB">1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">sTeamName</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">sizeof</span><span style="color: #007700">(</span><span style="color: #0000BB">sTeamName</span><span style="color: #007700">))&nbsp;;</span><span style="color: #FF8000">//&nbsp;Get&nbsp;Team&nbsp;Name<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">new&nbsp;</span><span style="color: #0000BB">iTeam&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">StringToInt</span><span style="color: #007700">(</span><span style="color: #0000BB">sTeamName</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">iTeam&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">)&nbsp;</span><span style="color: #FF8000">//&nbsp;Spectator<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">PrintToChat</span><span style="color: #007700">(</span><span style="color: #0000BB">client</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"[SM]&nbsp;The&nbsp;server&nbsp;operator&nbsp;has&nbsp;blocked&nbsp;this&nbsp;team!"</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">Plugin_Handled</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;Block&nbsp;it.<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">}<br />&nbsp;&nbsp;&nbsp;&nbsp;else&nbsp;</span><span style="color: #FF8000">//&nbsp;If&nbsp;not&nbsp;spectator<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">Plugin_Continue</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//&nbsp;Allow<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">}<br />}&nbsp;
<br /></span><span style="color: #0000BB"></span>
</span>
</code><!-- php buffer end -->
</div>
</code>
<hr />
</div>
</div></div>
</div>
</div><br /><b><font size="3">DONATE:</font></b><br />If you feel that I have done a good job, please consider supporting me.<br /><br /><a href="https://www.paypal.c....gif:NonHosted"target="_blank"><img src="https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif" border="0" alt="" /></a><br /><br />Thanks!</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/sp.gif"alt="File Type: sp" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>


<a href="http://www.sourcemod...74"><strong>GetPlugin</strong></a> or
<a href="https://forums.allie...1444592627">GetSource</a> (hl_blockspec.sp - 829 Bytes)


</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