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

[CS:GO] Simple GOTV record on ban (19/02/16)


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

Napisano 19.02.2016 18:14

<div>Based on: <a href="https://forums.allie...d.php?t=279234"target="_blank">https://forums.allie...t=279234</a><br /><br /><u><b>Description</b></u><br />Whenever a client is banned, it creates a demo of the last X minutes up to the point where he's banned. Optionally compresses, uploads to ftp and adds to sourcebans as a demo. This doesn't delay the actual ban. (X=tv_delay). Built for CS:GO, but CS:S might work.<br /><br /><u><b>Requirements</b></u><br />GOTV enabled (autorecord can be off)<br /><br /><b><u>Optional Requirements</u></b><br /><a href="https://forums.alliedmods.net/showthread.php?p=1517456" target="_blank">tEasyFTP</a><br /><a href="https://forums.alliedmods.net/showthread.php?t=175063" target="_blank">bzip2</a><br /><a href="https://forums.alliedmods.net/showthread.php?t=152216" target="_blank">curl</a><br /><br /><b><u>Configuration</u></b><br />Setup gotv, with relay on. Something like this:<br /><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">tv_enable&nbsp;</span><span style="color: #DD0000">"1"
<br /></span><span style="color: #0000BB">tv_relayvoice&nbsp;</span><span style="color: #DD0000">"1"
<br /></span><span style="color: #0000BB">tv_autorecord&nbsp;</span><span style="color: #DD0000">"0"
<br /></span><span style="color: #0000BB">tv_maxclients&nbsp;</span><span style="color: #DD0000">"1"
<br /></span><span style="color: #0000BB">tv_delay&nbsp;</span><span style="color: #DD0000">"300"&nbsp;
<br /></span><span style="color: #0000BB"></span>
</span>
</code><!-- php buffer end -->
</div>
</code>
<hr />
</div>
</div>Plugin configuration(change then compile)<br /><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">#define&nbsp;UploadFTP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//Requires&nbsp;tEasyFTP&nbsp;+&nbsp;curl&nbsp;-&nbsp;Uploads&nbsp;to&nbsp;FTP&nbsp;(config&nbsp;'demos')
<br />#define&nbsp;Sourcebans&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//Adds&nbsp;the&nbsp;demo&nbsp;to&nbsp;the&nbsp;ban&nbsp;(UploadFTP&nbsp;needs&nbsp;to&nbsp;be&nbsp;enabled!)
<br />#define&nbsp;sbprefix&nbsp;"sb"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//Sourcebans&nbsp;prefix
<br />#define&nbsp;compress&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//Compress
<br />#define&nbsp;RemoveUncompressed&nbsp;&nbsp;&nbsp;&nbsp;//Remove&nbsp;uncompressed&nbsp;file&nbsp;after&nbsp;compressing
<br />#define&nbsp;RemoveAfterUpload&nbsp;&nbsp;&nbsp;&nbsp;//Remove&nbsp;the&nbsp;demo(compressed&nbsp;if&nbsp;enabled)&nbsp;after&nbsp;uploading&nbsp;to&nbsp;FTP
<br />#define&nbsp;CompressLevel&nbsp;9&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//Compression&nbsp;level&nbsp;to&nbsp;use&nbsp;for&nbsp;BZ2&nbsp;
<br /></span><span style="color: #0000BB"></span>
</span>
</code><!-- php buffer end -->
</div>
</code>
<hr />
</div>
</div>It will only remove files if it was successful compression/upload.<br /><br />For FTP, create tEasyFTP config &quot;demos&quot; and make sure it leads to the demos folder you want. For sourcebans its sourcebans dir/demos/<br /><br />That's about it. Make sure to test it if it works before putting it on live server, the code is awful and not necessarily fully optimized.<br /><br />Thanks to k0nan for idea and testing it out.<br />Thanks to Coolpwner for testing.<br />And thanks to the creators of the tEasyFTP, curl &amp; bzip2.<br /><br /><b><u>Summary</u></b><br />To summarize it, GOTV constantly &quot;records&quot; and has a &quot;memory&quot; of last (tv_delay) seconds. Whenever a ban takes place, it saves that &quot;memory&quot; to a demo and, optionally, uploads to ftp and adds it to sourcebans as a demo to the ban. This doesn't delay the ban. If your tv_delay is 180, it would save the 3 minutes before the ban took place, all the way to the point when the player was banned.<br /><br />Very simple concept, I put it together in couple of minutes so the code is redundant. It works though.</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/smx.gif"alt="File Type: smx" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>


<a href="https://forums.allie...ecorder.smx</a>(7.3 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...58"><strong>GetPlugin</strong></a> or
<a href="https://forums.allie...1455901434">GetSource</a> (gotv-recorder.sp - 6.3 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