Raised This Month: $32 Target: $400
 8% 

[CS:S/CS:GO] Knifetop (1.1 1/September/2015)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Plugin ID:
4799
Plugin Version:
1.1
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    7 
    Plugin Description:
    Do you like stabbing? Compete with other players!
    Old 08-31-2015 , 04:47   [CS:S/CS:GO] Knifetop (1.1 1/September/2015)
    Reply With Quote #1

    Stabbing people offline for the lulz is illegal, go have fun online instead



    Remake of the old uncontinued "KnifeTop" plugin, with CS:GO support, an API and features that seem useless to me removed. Written for the new SourcePawn syntax.

    Changelog:
    1.1 hotfix (1/September/2015) -
    I'm retarded, fixed an issue where the killed person gets the amount of kills that his killer had.

    Requirements:
    A Counter-Strike: Source or Counter-Strike: Global Offensive server.
    SourceMod 1.7 and above.
    SM_Hosties 2's .inc files to compile.
    A MySQL server, may add SQLite support soon.

    About:
    It took me long enough to modify the old plugin in order to make it work with CS:GO. Well, not worth the time.
    How about I make a new one which is also extensible? Good idea
    SQL related code mostly taken from shavit's simple bhop timer, give it a try if you own a server that needs a stable timer.

    Features:
    Counts knife kills.
    Adds a top25 menu (sm_knifetop/sm_ktop).
    Has a developer API.
    Team filters.
    SM_Hosties 2 support.

    Installation:
    1. Add a database entry in addons/sourcemod/configs/databases.cfg, call it "knifetop"
    Example:
    Code:
    "Databases"
    {
    	"driver_default"		"mysql"
    	
    	// When specifying "host", you may use an IP address, a hostname, or a socket file path
    	
    	"default"
    	{
    		"driver"		"default"
    		"host"			"localhost"
    		"database"		"sourcemod"
    		"user"			"root"
    		"pass"		""
    		//"timeout"		"0"
    		//"port"		"0"
    	}
    	
    	"knifetop"
    	{
    		"driver"		"mysql"
    		"host"			"localhost"
    		"database"		"knifetop"
    		"user"			"root"
    		"pass"		""
    	}
    }
    2. Copy the knifetop.smx file to your plugins (addons/sourcemod/plugins) folder.
    3. Restart your server. (Manual loading isn't possible due to modifying databases.cfg)
    3.1. (optional) Open cfg/sourcemod/plugin.knifetop.cfg, edit the configuration and restart the server again.

    Commands:
    Code:
    ] sm_rcon sm cmds knifetop
    [SM] Listing commands for: Knifetop
      [Name]            [Type]   [Help]
      sm_knifetop       console      Opens a menu that shows the top25 stabbers!
      sm_ktop           console      Opens a menu that shows the top25 stabbers!
    Console Variables:
    Code:
    // This file was auto-generated by SourceMod (v1.7.2)
    // ConVars for plugin "knifetop.smx"
    
    
    // Is the plugin enabled?
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    knifetop_enable "1"
    
    // In effect only if SM_Hosties 2 is installed on the server!
    // Ignore knifetop_team if a knife kill was done between 2 players in a last request?
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    knifetop_hosties_lr "1"
    
    // Which teams should have knife kills counted?
    // 0 - Everyone
    // 2 - Terroists
    // 3 - Counter-Terrorists
    // -
    // Default: "0"
    // Minimum: "0.000000"
    // Maximum: "3.000000"
    knifetop_team "0"
    
    // Amount of people to display when using sm_knifetop.
    // -
    // Default: "25"
    // Minimum: "1.000000"
    knifetop_top_limit "25"
    Developers' API:
    Code:
    // 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
    #define KNIFETOP_VERSION "1.0" // Will change over time
    
    /**
     * Called when a knife kill gets count to stats.
     *
     * @param client					Client index.
     * @param newkills				Amount of knife kills after 
     * @noreturn
     */
    forward void Knifetop_OnKnifeKill(int client, int newkills);
    
    // excuse me for "Amount of knife kills after" but I had no proper way to express myself.
    
    /**
     * Gets the amount of knife kills from a player. 
     *
     * @param client					Client index.
     * @return						Amount of knife kills. 0 if never killed with a knife.
     */
    native int Knifetop_GetKnifeKills(int client);
    Attached Files
    File Type: inc knifetop.inc (2.0 KB, 739 views)
    File Type: smx knifetop.smx (10.3 KB, 789 views)
    File Type: sp Get Plugin or Get Source (knifetop.sp - 791 views - 10.1 KB)
    __________________
    retired

    Last edited by shavit; 05-22-2016 at 00:55. Reason: removed donation button
    shavit is offline
    shavit
    AlliedModders Donor
    Join Date: Dec 2011
    Location: Israel
    Old 09-01-2015 , 08:33   Re: [CS:S/CS:GO] Knifetop (1.1 1/September/2015)
    Reply With Quote #2

    Changelog:
    1.1 hotfix (1/September/2015) -
    I'm retarded, fixed an issue where the killed person gets the amount of kills that his killer had.
    __________________
    retired
    shavit is offline
    barsminsk
    Junior Member
    Join Date: Sep 2015
    Location: Belarus, Minsk
    Old 10-11-2015 , 07:22   Re: [CS:S/CS:GO] Knifetop (1.1 1/September/2015)
    Reply With Quote #3

    What if i dont want to use mysql, i want to use sqlite insted/
    "knifetop"
    {
    "driver" "sqlite"
    "database" "knifetop"
    }

    plugins starts but ingame statistics dont work

    Any ideas?
    barsminsk is offline
    Send a message via Skype™ to barsminsk
    shavit
    AlliedModders Donor
    Join Date: Dec 2011
    Location: Israel
    Old 10-15-2015 , 05:30   Re: [CS:S/CS:GO] Knifetop (1.1 1/September/2015)
    Reply With Quote #4

    Quote:
    Originally Posted by barsminsk View Post
    What if i dont want to use mysql, i want to use sqlite insted/
    "knifetop"
    {
    "driver" "sqlite"
    "database" "knifetop"
    }

    plugins starts but ingame statistics dont work

    Any ideas?
    SQLite is not supported.
    __________________
    retired
    shavit is offline
    Spy1337
    Member
    Join Date: Aug 2011
    Old 03-18-2016 , 18:03   Re: [CS:S/CS:GO] Knifetop (1.1 1/September/2015)
    Reply With Quote #5

    would love it when it supports SQLite
    __________________
    Spy1337 is offline
    Sarin
    Senior Member
    Join Date: Nov 2014
    Location: Sydney, Australia
    Old 03-17-2019 , 01:07   Re: [CS:S/CS:GO] Knifetop (1.1 1/September/2015)
    Reply With Quote #6

    L 03/17/2019 - 05:049: [knifetop.smx] Knifetop error! Failed to insert "Sariи"'s data to the table. Reason: Incorrect string value: '\xD0\xB8' for column `ozgaming_knifetopggdm`.`players`.`name` at row 1
    Sarin is offline
    pkr1992
    Junior Member
    Join Date: Jun 2019
    Old 11-09-2020 , 14:58   Re: [CS:S/CS:GO] Knifetop (1.1 1/September/2015)
    Reply With Quote #7

    Hello

    How to reset rank?
    pkr1992 is offline
    Sarin
    Senior Member
    Join Date: Nov 2014
    Location: Sydney, Australia
    Old 11-09-2020 , 22:42   Re: [CS:S/CS:GO] Knifetop (1.1 1/September/2015)
    Reply With Quote #8

    I am unable to get this to work these days.
    Does it store the data on the server or database?
    Sarin is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 03:07.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode