<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 "KnifeTop" 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 "knifetop"<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">"Databases"<br />{<br /> "driver_default" "mysql"<br /> <br /> // When specifying "host", you may use an IP address, a hostname, or a socket file path<br /> <br /> "default"<br /> {<br /> "driver" "default"<br /> "host" "localhost"<br /> "database" "sourcemod"<br /> "user" "root"<br /> "pass" ""<br /> //"timeout" "0"<br /> //"port" "0"<br /> }<br /> <br /> "knifetop"<br /> {<br /> "driver" "mysql"<br /> "host" "localhost"<br /> "database" "knifetop"<br /> "user" "root"<br /> "pass" ""<br /> }<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 /> [Name] [Type] [Help]<br /> sm_knifetop console Opens a menu that shows the top25 stabbers!<br /> sm_ktop console 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 "knifetop.smx"<br /><br /><br />// Is the plugin enabled?<br />// -<br />// Default: "1"<br />// Minimum: "0.000000"<br />// Maximum: "1.000000"<br />knifetop_enable "1"<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: "1"<br />// Minimum: "0.000000"<br />// Maximum: "1.000000"<br />knifetop_hosties_lr "1"<br /><br />// Which teams should have knife kills counted?<br />// 0 - Everyone<br />// 2 - Terroists<br />// 3 - Counter-Terrorists<br />// -<br />// Default: "0"<br />// Minimum: "0.000000"<br />// Maximum: "3.000000"<br />knifetop_team "0"<br /><br />// Amount of people to display when using sm_knifetop.<br />// -<br />// Default: "25"<br />// Minimum: "1.000000"<br />knifetop_top_limit "25"</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 "1.0" // Will change over time<br /><br />/**<br /> * Called when a knife kill gets count to stats.<br /> *<br /> * @param client Client index.<br /> * @param newkills Amount of knife kills after <br /> * @noreturn<br /> */<br />forward void Knifetop_OnKnifeKill(int client, int newkills);<br /><br />// excuse me for "Amount of knife kills after" but I had no proper way to express myself.<br /><br />/**<br /> * Gets the amount of knife kills from a player. <br /> *<br /> * @param client Client index.<br /> * @return Amount of knife kills. 0 if never killed with a knife.<br /> */<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ł
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.
|
Guest Message by DevFuse

[CS:S/CS:GO] Knifetop
Temat rozp. Adminek AMXX.PL, 31.08.2015 09:47
Brak odpowiedzi do tego tematu
Użytkownicy przeglądający ten temat: 0
0 użytkowników, 0 gości, 0 anonimowych