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

CSstatsX SQL


  • 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 23.02.2016 17:25

<div><div align="center"><font color="Lime"><b><font size="6">CSstatsX SQL<br /><br /></font></b></font></div> <b><font color="#00ff00">Description</font></b><br /> This plugin can replace your <b>CSX</b> module. You need do some changes to your statistics plugins (statsx, miscstats etc.) to make them use this plugin, see how-to below. If you can't or you dont want use MySQL, this plugin will also work with local SQLite database. New features: player played time count and ranking by skill with <b>ELO method</b>.<br /><br /> Version: <b>0.5</b> from <font color="#ffff00"><b>22.02.2016</b></font> <b>[ <a href="https://github.com/serfreeman1337/csstatsx-sql" target="_blank"><font color="#ff0000">GIT</font></a> ]</b><br /> <br /> <b><font color="#00ff00">Requirements</font></b><br /> <ul><li><b><font color="#ffff00">AMXX 1.8.2 hg26</font> or higher</b>.</li>
<li><font color="#ffff00"><b><a href="http://www.amxmodx.org/snapshots.php"target="_blank">AMXX 1.8.3 git3799</a></b></font><b> or higher</b> for UTF8 support</li>
</ul> <b><font color="#00ff00">Installation</font></b><br /> <ul><li>Compile this plugin.<ul><li>For utf8 support you need compile and use it with AMXX 1.8.3.</li>
</ul></li>
<li>Uncomment wanted SQL module in <b>addons/amxmodx/configs/modules.ini</b> file.</li>
<li>Set db connection details in following cvars: <b>csstats_sql_host</b>, <b>csstats_sql_user</b>, <b>csstats_sql_pass</b>, <b>csstats_sql_db</b>, <b>csstats_sql_type</b>.</li>
<li>Read instruction bellow to add support for your stats plugins.</li>
<li>For update from<b> 0.4</b> import<b> csstats_04_to_05.sql</b>.</li>
<li>For update from <b>0.5</b> dev import<b> csstats_05dev_to_05.sql</b>.</li>
</ul> <b><font color="#00ff00">How to replace CSX module</font></b><br /> <ul><li>In <i><b>your</b></i> compiler folder open file <b>include/csx.inc</b> and replace following:<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">#pragma reqclass xstats<br />#if !defined AMXMODX_NOAUTOLOAD<br />&nbsp; &nbsp; #pragma defclasslib xstats csx<br />#endif</code><hr />
</div>for<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">#pragma reqlib xstats</code><hr />
</div></li>
<li>Recompile <i><b>ALL </b></i>your stats plugins (statsx, miscstats and etc.) with <i><b>YOUR</b></i> compiler.</li>
<li>Set cvar <b>csstats_sql_forwards</b> <b>1</b>.</li>
<li>Write <b>csstatsx_sql.amxx</b> <i><b>on top</b></i> in your plugins.ini</li>
<li>Do <i><b>hard restart </b></i>server (quit).</li>
<li>Check that csx module <i><b>is not </b></i>running with <b>amxx modules</b> command.</li>
</ul> <b><font color="#00ff00">How to add support for your plugins<br /><br /></font></b> Perform this instructions for <i><b>ALL </b></i>your stats plugins<br /> <ul><li>Open plugin source code.</li>
<li>Add following on top:<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">native get_statsnum_sql()<br />native get_user_stats_sql(index, stats[8], bodyhits[8])<br />native get_stats_sql(index, stats[8], bodyhits[8], name[], len, authid[] = &quot;&quot;, authidlen = 0)</code><hr />
</div></li>
<li>Replace all <b>get_statsnum</b> for <b>get_statsnum_sql</b>.</li>
<li>Replace all <b>get_user_stats</b> for <b>get_user_stats_sql</b>.</li>
<li>Replace all <b>get_stats</b> for <b>get_stats_sql</b>.</li>
<li>Compile plugin.</li>
</ul> <b><font color="#00ff00">Cvars</font></b><br /> <ul><li><b><font color="#ff0000">csstats_sql_host</font> &quot;<font color="#ffff00">localhost</font>&quot;</b> - MySQL host.</li>
<li><b><font color="#ff0000">csstats_sql_user</font> &quot;<font color="#ffff00">root</font>&quot;</b> - MySQL user</li>
<li><b><font color="#ff0000">csstats_sql_pass</font> &quot;&quot;</b> - MySQL user password</li>
<li><b><font color="#ff0000">csstats_sql_db</font> &quot;<font color="#ffff00">amxx</font>&quot;</b> - DB name</li>
<li><b><font color="#ff0000">csstats_sql_table</font> &quot;<font color="#ffff00">csstats</font>&quot;</b> - table name</li>
<li><b><font color="#ff0000">csstats_sql_type</font> &quot;<font color="#ffff00">mysql</font>&quot;</b> - database type.<ul><li><font color="#ffff00"><b>mysql</b></font> - MySQL</li>
<li><font color="#ffff00"><b>sqlite</b></font> - SQLite</li>
</ul></li>
<li><b><font color="#ff0000">csstats_sql_create_db</font> &quot;<font color="#ffff00">1</font>&quot;</b> - auto create table.<ul><li><font color="#ffff00"><b>0</b></font> - dont query table create</li>
<li><font color="#ffff00"><b>1</b></font> - query table create on map load</li>
</ul></li>
<li><font color="#ff0000"><b>csstats_sql_update</b></font> <b>&quot;<font color="#ffff00">-2</font>&quot;</b> - how to update player stats in db<ul><li><font color="#ffff00"><b>-2</b></font> - on death and disconnect</li>
<li><font color="#ffff00"><b>-1</b></font> - on round end and disconnect</li>
<li><font color="#ffff00"><b>0</b></font> - on disconnect</li>
<li><font color="#ffff00"><b>higher than</b><b> 0</b></font> - every n seconds and disconnect</li>
</ul></li>
<li><font color="#ff0000"><b>csstats_sql_forwards</b></font> <b>&quot;<font color="#ffff00">0</font>&quot;</b> - enable own forwards for client_death, client_damage<ul><li><font color="#ffff00"><b>0</b></font> - disable</li>
<li><font color="#ffff00"><b>1</b></font> - enable, required if you want replace csx module</li>
</ul></li>
<li><font color="#ff0000"><b>csstats_sql_rankformula</b></font> <b>&quot;<font color="#ffff00">0</font>&quot;</b> - how to rank player<ul><li><font color="#ffff00"><b>0</b></font> - kills- deaths - tk</li>
<li><font color="#ffff00"><b>1</b></font> - kills</li>
<li><font color="#ffff00"><b>2</b></font> - kills + hs</li>
<li><font color="#ffff00"><b>3</b></font> - skill</li>
</ul></li>
<li><font color="#ff0000"><b>csstats_sql_skillformula</b></font> &quot;0&quot; - skill formula<ul><li><font color="#ffff00"><b>0</b></font> - The ELO Method (<a href="http://fastcup.net/rating.html"target="_blank">http://fastcup.net/r...rating.html</a>)</li>
</ul> </li>
</ul> <b><font color="#00ff00">Lags on player top 15 motd</font></b><br /><br /> For top15 motd non-thread queries are used, this can make your server lag while displaying motd. I added support for threaded queries for top15 from version 0.4, but to add this support for your stats plugins you need to be a somekind of scripter. Send <a href="http://1337.uz/en/feedback/"target="_blank">me</a> your stats plugins source code or use plugins with threaded support bellow.<br /> <a href="http://1337.uz/download/plugins/csxmysql_amxx_statsx.zip" target="_blank">csxmysql_amxx_statsx.zip</a> (22.2 KiB)<br /> <a href="http://1337.uz/download/plugins/csxmysql_aes_statsx.zip" target="_blank">csxmysql_aes_statsx.zip</a> (16.7 KiB)<br /> <a href="http://1337.uz/download/plugins/csxmysql_aes_statsx_skill.zip" target="_blank">csxmysql_aes_statsx_skill.zip</a> (16.8 KiB)<br /><br /> Other thanks for LeninChan^^ and 9art for testing.</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/sma.gif"alt="File Type: sma" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>

<a href="http://www.amxmodx.o...61"><strong>GetPlugin</strong></a> or
<a href="https://forums.allie...1456244736">GetSource</a> (csstatsx_sql.sma - 68.5 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