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

[L4D2] pcsWelcome Message


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

Napisano 16.06.2024 21:02

<div><b><u><font size="3">Description</font></u></b><br />This plugin uses HookEvent(&quot;player_team&quot;) and grabs their new (and old) team. If their team is 0, they aren't fully-loaded. If their team is 1, they are loaded but haven't been assigned a team yet because other players are still loading (or are about to be assigned a team). Once players have been assigned to team 2 (survivors) or team 3 (infected), they are fully past the loading screen and can see chat. This plugin then displays a message to them. This plugin should be compatible with competitive L4D2 servers as well.<br /><br />By default, this prints 2 messages to each player individual, translated to their language provided in the phrases file. You also have an option to make it print every map, or just on the very first time they connect to the server. Once they disconnect, they'll see the welcome message again.<br /><br />An autoexec is created in <b>cfg/sourcemod</b> for this plugin.<br /><br /><b><u><font size="3">Cvars</font></u></b><ul><li>pcs_everymap &quot;1&quot; // Whether to print every map.</li>
<li>pcs_lines &quot;2&quot; // How many lines to print.</li>
</ul><br />Other plugins use things like player_connect, player_spawn, or OnClientPutInServer(), etc. Some of these fire multiple times in L4D2 especially during map changes, and don't cover the initial time everyone is loading in from a lobby where load times and connections vary. As well, things like OnClientPutInServer() will fire before a client finishes loading.<br /><br /><b><u><font size="3">Compiling</font></u></b><br /><br />In order to compile, you will need colors.inc -&gt;<br /><a href="https://forums.allie...ad.php?t=96831"target="_blank" rel="noopener">https://forums.allie...?t=96831</a><br /><br /><b><u><font size="3">Installation</font></u></b><br /><br />You don't need to mess with any of the code to change the messages in the translation files.<br /><b>pcsWelcome.smx</b> -&gt; addons/sourcemod/plugins<br /><b>pcswelcome.phrases.txt</b> -&gt; addons/sourcemod/translations<br /><br /><b><u>Changelog</u></b>:<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">1.0 (July 16th - 2024)<br />&nbsp; - Initial release.</code><hr />
</div><b><u><font size="3">Additional</font></u></b><br />This is a very simple plugin. While I plan to add to it, the whole point of it is for others to build on it and tailor it to their own liking. You can increase the amount of lines by changing a few things in a few places easily. The plugin also should work for Left4Dead1, but I do not have a server setup to test these so if you want you can remove the <b>public APLRes AskPluginLoad2</b> at the top to let it load.</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="https://www.sourcemo...06"><strong>GetPlugin</strong></a> or
<a href="https://forums.allie...1718568255">GetSource</a> (pcsWelcome.sp - 2.7 KB)


</td>
</tr><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...phrases.txt</a>(549 Bytes)


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


<a href="https://forums.allie...Welcome.smx</a>(7.1 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