Raised This Month: $66 Target: $400
 16% 

[ANY] Bunnyhop Statistics (v1.2.0 10/December/2017)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Plugin ID:
5310
Plugin Version:
1.2.0
Plugin Category:
Statistical
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    SourceMod API that provides bunnyhop related statistics.
    Old 08-09-2016 , 09:41   [ANY] Bunnyhop Statistics (v1.2.0 10/December/2017)
    Reply With Quote #1

    A better looking page because Markdown > BBCode
    GitHub Repository



    Bunnyhop Statistics
    Bunnyhop Statistics is an API made in SourcePawn for developers that provides bhop related statistics.
    Made with hope it will be used for the creation of high quality, open sourced anti-cheats or bhop server utilities for Source Engine games.
    Note: Not tested with autobhop plugins at all, use at your own risk!

    Download
    Either download the attached .zip or from the GitHub releases page.

    Requirements:
    Forwards
    Code:
    // Called when the jump key is pressed.
    // The variable `onground` will be true if the jump key will do anything for the player when tapped.
    forward void Bunnyhop_OnJumpPressed(int client, bool onground);
    
    // Called when the jump key is released.
    // The variable `onground` will be true if the jump key will do anything for the player when tapped.
    forward void Bunnyhop_OnJumpReleased(int client, bool onground);
    
    // Called when the player touches the ground.
    forward void Bunnyhop_OnTouchGround(int client);
    
    // Called when the player leaves the ground, by either jumping or falling from somewhere.
    // AKA the HookEventless better version of player_jump.
    // The `jumped` variable is true if the ground was left by tapping the jump key, or false if the player fell from somewhere.
    // `ladder` is true if the player left the 'ground' from a ladder.
    forward void Bunnyhop_OnLeaveGround(int client, bool jumped, bool ladder);
    Natives: (Methodmap equivalents are also available)
    Code:
    // Amount of separate +jump inputs since the player left the ground.
    // The result will be 0 if the player is on ground.
    native int Bunnyhop_GetScrollCount(int client);
    
    // Is the player on ground?
    // The result will be true if the player is on a ladder or in water, as jumping will be functional.
    native bool Bunnyhop_IsOnGround(int client);
    
    // Is the player holding the jump key?
    native bool Bunnyhop_IsHoldingJump(int client);
    
    // Gets a percentage of perfectly timed bunnyhops.
    // Resets at player connection or the Bunnyhop_ResetPerfectJumps native for it is called.
    // Results are from 0.0 to 100.0.
    native float Bunnyhop_GetPerfectJumps(int client);
    
    // Resets the perfect jumps percentage of a player back to 0.0.
    native void Bunnyhop_ResetPerfectJumps(int client);
    Methodmaps usage:
    Code:
    // Class-like
    BunnyhopStats stats = new BunnyhopStats(client);
    PrintToServer("Scroll count: %d\nOn ground? %s\nHolding jump key? %s", stats.ScrollCount, (stats.OnGround)? "Yes":"No", (stats.HoldingJump)? "Yes":"No");
    
    // Static
    PrintToServer("Scroll count: %d\nOn ground? %s\nHolding jump key? %s", BunnyhopStats.GetScrollCount(client), (BunnyhopStats.IsOnGround(client))? "Yes":"No", (BunnyhopStats.IsHoldingJump(client))? "Yes":"No");
    Report issues here.
    Contribute by sending a pull request here.
    Attached Files
    File Type: zip bhopstats-1.2.0.zip (24.8 KB, 324 views)
    File Type: sp Get Plugin or Get Source (bhopstats.sp - 134 views - 5.5 KB)
    File Type: inc bhopstats.inc (5.3 KB, 141 views)
    File Type: sp Get Plugin or Get Source (pad.sp - 131 views - 1.2 KB)
    __________________
    retired

    Last edited by shavit; 12-09-2017 at 20:47.
    shavit is offline
    shavit
    AlliedModders Donor
    Join Date: Dec 2011
    Location: Israel
    Old 08-09-2016 , 12:19   Re: [ANY] Bunnyhop Statistics (v1.1.0 09/August/2016)
    Reply With Quote #2

    Example plugin that displays the amount of scrolls done per jump as center text attached.
    Activate with sm_pad.
    Attached Files
    File Type: sp Get Plugin or Get Source (pad.sp - 70 views - 1.2 KB)
    File Type: smx pad.smx (4.4 KB, 59 views)
    __________________
    retired
    shavit is offline
    Technoblazed
    Senior Member
    Join Date: May 2016
    Location: United Kingdom
    Old 08-09-2016 , 12:20   Re: [ANY] Bunnyhop Statistics (v1.1.0 09/August/2016)
    Reply With Quote #3

    https://www.youtube.com/watch?v=28GLa9T2CtI
    Technoblazed is offline
    shavit
    AlliedModders Donor
    Join Date: Dec 2011
    Location: Israel
    Old 12-09-2017 , 20:46   Re: [ANY] Bunnyhop Statistics (v1.1.0 09/August/2016)
    Reply With Quote #4

    Updated to v1.2. Changed hooking method to SDKHook_PostThinkPost rather than OnPlayerRunCmd.

    I encourage you to update if you use this with bhoptimer.
    __________________
    retired
    shavit is offline
    Reply


    Thread Tools
    Display Modes

    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 09:20.


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