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

[CS:S/CS:GO] Knifetop


  • 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 31.08.2015 09:47

<div><font size="4">Stabbing people offline for the lulz is illegal, go have fun online instead :P</font><br /><br /><img src="http://i.imgur.com/sYPGZnJ.png"border="0" alt="" /><br /><br /><font size="1">Remake of the <a href="https://forums.alliedmods.net/showthread.php?p=819371" target="_blank">old uncontinued &quot;KnifeTop&quot; plugin</a>, with CS:GO support, an API and features that seem useless to me removed. Written for the new SourcePawn syntax.</font><br /><br /><font size="3"><u>Requirements:</u></font><br />A Counter-Strike: Source or Counter-Strike: Global Offensive server.<br />SourceMod 1.7 and above.<br /><a href="https://forums.alliedmods.net/forumdisplay.php?f=155" target="_blank">SM_Hosties 2</a>'s .inc files to compile.<br />A MySQL server, <i>may</i> add SQLite support soon.<br /><br /><font size="3"><u>About<b></b>:</u></font><br />It took me long enough to modify the old plugin in order to make it work with CS:GO. Well, not worth the time.<br />How about I make a new extensible? Good idea :D<br />SQL related code mostly taken from <a href="https://forums.alliedmods.net/showthread.php?t=265456" target="_blank">shavit's simple bhop timer</a>, give it a try if you own a server that needs a stable timer.<br /><br /><font size="3"><u>Features:</u></font><br />Counts knife kills.<br />Adds a top25 menu (sm_knifetop/sm_ktop).<br />Has a developer API.<br />Team filters.<br /><a href="https://forums.alliedmods.net/forumdisplay.php?f=155" target="_blank">SM_Hosties 2</a> support.<br /><br /><font size="3"><u>Installation:<br /></u></font>1. Add a database entry in addons/sourcemod/configs/databases.cfg, call it &quot;knifetop&quot;<br />Example:<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">&quot;Databases&quot;<br />{<br />&nbsp; &nbsp; &nbsp; &nbsp; &quot;driver_default&quot;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;mysql&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; // When specifying &quot;host&quot;, you may use an IP address, a hostname, or a socket file path<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &quot;default&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;driver&quot;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;default&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;host&quot;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;localhost&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;database&quot;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;sourcemod&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;user&quot;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;root&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;pass&quot;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //&quot;timeout&quot;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;0&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //&quot;port&quot;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;0&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &quot;knifetop&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;driver&quot;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;mysql&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;host&quot;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;localhost&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;database&quot;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;knifetop&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;user&quot;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;root&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;pass&quot;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />}</code><hr />
</div>2. Copy the knifetop.smx file to your plugins (addons/sourcemod/plugins) folder.<br />3. Restart your server. (Manual loading isn't possible due to modifying databases.cfg)<br />3.1. (optional) Open cfg/sourcemod/plugin.knifetop.cfg, edit the configuration and restart the server again.<br /><br /><font size="3"><u>Commands:</u></font><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">] sm_rcon sm cmds knifetop<br />[SM] Listing commands for: Knifetop<br />&nbsp; [Name]&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [Type]&nbsp; [Help]<br />&nbsp; sm_knifetop&nbsp; &nbsp; &nbsp; console&nbsp; &nbsp; &nbsp; Opens a menu that shows the top25 stabbers!<br />&nbsp; sm_ktop&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; console&nbsp; &nbsp; &nbsp; Opens a menu that shows the top25 stabbers!</code><hr />
</div><font size="3"><u>Console Variables:</u></font><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">// This file was auto-generated by SourceMod (v1.7.2)<br />// ConVars for plugin &quot;knifetop.smx&quot;<br /><br /><br />// Is the plugin enabled?<br />// -<br />// Default: &quot;1&quot;<br />// Minimum: &quot;0.000000&quot;<br />// Maximum: &quot;1.000000&quot;<br />knifetop_enable &quot;1&quot;<br /><br />// In effect only if SM_Hosties 2 is installed on the server!<br />// Ignore knifetop_team if a knife kill was done between 2 players in a last request?<br />// -<br />// Default: &quot;1&quot;<br />// Minimum: &quot;0.000000&quot;<br />// Maximum: &quot;1.000000&quot;<br />knifetop_hosties_lr &quot;1&quot;<br /><br />// Which teams should have knife kills counted?<br />// 0 - Everyone<br />// 2 - Terroists<br />// 3 - Counter-Terrorists<br />// -<br />// Default: &quot;0&quot;<br />// Minimum: &quot;0.000000&quot;<br />// Maximum: &quot;3.000000&quot;<br />knifetop_team &quot;0&quot;<br /><br />// Amount of people to display when using sm_knifetop.<br />// -<br />// Default: &quot;25&quot;<br />// Minimum: &quot;1.000000&quot;<br />knifetop_top_limit &quot;25&quot;</code><hr />
</div><font size="3"><u>Developers' API:</u></font><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">// Will never have a letter in it, you can use StringToFloat in other plugins in case you want backwards compability for new features I add<br />#define KNIFETOP_VERSION &quot;1.0&quot; // Will change over time<br /><br />/**<br />&nbsp;* Called when a knife kill gets count to stats.<br />&nbsp;*<br />&nbsp;* @param client&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Client index.<br />&nbsp;* @param newkills&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Amount of knife kills after <br />&nbsp;* @noreturn<br />&nbsp;*/<br />forward void Knifetop_OnKnifeKill(int client, int newkills);<br /><br />// excuse me for &quot;Amount of knife kills after&quot; but I had no proper way to express myself.<br /><br />/**<br />&nbsp;* Gets the amount of knife kills from a player. <br />&nbsp;*<br />&nbsp;* @param client&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Client index.<br />&nbsp;* @return&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Amount of knife kills. 0 if never killed with a knife.<br />&nbsp;*/<br />native int Knifetop_GetKnifeKills(int client);</code><hr />
</div><u><font size="3">Donate:</font></u><br />Appreciate my work? Would be glad if you'd donate, it helps towards developing especially because I need a new PSU. I'm really grateful for any donation of any amount :)<br /><br /><a href="https://www.paypal.c...=4SUE72P3T74WA"target="_blank"><img src="https://www.paypalobjects.com/en_US/IL/i/btn/btn_donateCC_LG.gif" border="0" alt="" /></a></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/inc.gif"alt="File Type: inc" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>


<a href="https://forums.allie...nifetop.inc</a>(2.0 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...23"><strong>GetPlugin</strong></a> or
<a href="https://forums.allie...1441011811">GetSource</a> (knifetop.sp - 10.1 KB)


</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...nifetop.smx</a>(10.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