Raised This Month: $7 Target: $400
 1% 

[CS:S] Longjump Stats


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Miu
Veteran Member
Join Date: Nov 2013
Plugin ID:
3970
Plugin Version:
2.0.1
Plugin Category:
Statistical
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
    60 
    Plugin Description:
    Old 11-14-2013 , 20:46   [CS:S] Longjump Stats
    Reply With Quote #1

    Shows jump statistics.

    cvars:
    • ljstats_color_min - (default: ADD8E6) hexadecimal RGB value controlling the color of the minimum longjump distance.
    • ljstats_color_max - (default: 0000FF) hexadecimal RGB value controlling the color of the maximum longjump distance. Any distances between the minimum and maximum will have an intermediate color between these two color values.
    • ljstats_lj_min - (default: 260.0) floating-point value controlling the minimum longjump/countjump distance for the jump to be output to chat. 0 disables it.
    • ljstats_lj_noduck_min - (default: 256.0) floating-point value controlling the minimum no-duck longjump distance for the jump to be output to chat. 0 disables it.
    • ljstats_lj_max - (default: 275.0) floating-point value controlling the maximum longjump distance in regards to color coding.
    • ljstats_lj_max_prestrafe - (default: 280.0)
    • ljstats_lj_scout_stats - (default: 0)
    • ljstats_lj_client_min - (default: 0.0)
    • ljstats_wj_min - (default: 270.0) floating-point value controlling the minimum weirdjump distance for the jump to be output to chat. 0 disables it.
    • ljstats_wj_drop_max - (default: 30.0)
    • ljstats_bj_min - (default: 270.0) floating-point value controlling the minimum bhopjump distance for the jump to be output to chat. 0 disables it.
    • ljstats_laj_min - (default: 120.0) floating-point value controlling the minimum ladderjump distance for the jump to be output to chat. 0 disables it.
    • ljstats_verbosity - (default: 2)
    • ljstats_print_failed_block_stats - (default: 1) boolean value controlling whether failed blocklongjump stats will be printed to chat.
    • ljstats_show_bhop_stats - (default: 0)
    • ljstats_output_1.6_style - (default: 0)
    • ljstats_ljtop_allow_easybhopjump - (default: 1)
    • ljstats_lj_sound - (default: 1) boolean value controlling whether sounds are enabled.
    • ljstats_lj_sound1 to ljstats_lj_sound5 - (defaults: 260.0, 265.0, 268.0, 270.0, 0.0, respectively) floating-point values controlling the minimum longjump/countjump distance to trigger sound1-5. 0 disables it.
    • ljstats_lj_sound1_file to ljstats_lj_sound5_file - (defaults: "misc/perfect.wav", "misc/mod_wickedsick.wav", "misc/mod_godlike.wav", "misc/holyshit.wav", "", respectively) strings containing sound1-5 file path (relative to cstrike/sound).
    • ljstats_lj_sound1_to_all to ljstats_lj_sound5_to_all - (defaults: 0)

    commands:
    • sm_lj - toggles the statistics display
    • sm_ljpanel - toggles the individual strafe statistics panel to the left
    • sm_ljbeam - toggles the creation of a beam/trail with static Z coord when jumping, tracking your path from the jumpoff origin to the landing point
    • sm_ljsound - toggles sounds
    • sm_ljblock - toggles block mode. Unlike justshoot's plugin, this does not require perpetual, manual selection of the destination block and will automatically try to locate the block. It will trace the wrong way if you're standing closer to opposite edge of a corner, or the block you're standing on does not face the destination.
    • sm_ljpb - shows personal longjump record
    • sm_gap
    • sm_blockgap
    • sm_ljtop
    • sm_ljtopdelete
    • sm_ljsettings
    • sm_ljver - outputs version

    installation:
    • Stuff ljstats.smx file in cstrike/addons/sourcemod/plugins (Download the "ljstats.smx" file at the bottom, don't press "Get Plugin")
    • Add the following to databases.cfg for ljtop:
      PHP Code:
      "ljstats"
          
      {
              
      "driver"            "sqlite"
              "host"                "localhost"
              "database"            "ljstats"
              "user"                "root"
              "pass"                ""
          

    • If you want sounds to be downloadable from your server, stuff the sounds in misc.zip into cstrike/sound

    requires more colors and smlib/arrays to compile
    Attached Files
    File Type: zip misc.zip (385.6 KB, 1694 views)
    File Type: sp Get Plugin or Get Source (ljstats.sp - 1297 views - 127.8 KB)
    File Type: smx ljstats.smx (61.2 KB, 1543 views)

    Last edited by Miu; 10-05-2016 at 18:42.
    Miu is offline
    shavit
    AlliedModders Donor
    Join Date: Dec 2011
    Location: Israel
    Old 11-15-2013 , 01:10   Re: [CS:S] Longjump Stats
    Reply With Quote #2

    Code:
    public StatsMenuHandler(Handle:hMenu, MenuAction:action, param1, param2) 
    {
    }
    You should close the menu handle there if action == MenuAction_End.

    Seems like a good plugin to be honest, I'll use it.
    __________________
    retired
    shavit is offline
    Miu
    Veteran Member
    Join Date: Nov 2013
    Old 11-15-2013 , 07:28   Re: [CS:S] Longjump Stats
    Reply With Quote #3

    Quote:
    Originally Posted by shavit View Post
    Code:
    public StatsMenuHandler(Handle:hMenu, MenuAction:action, param1, param2) 
    {
    }
    You should close the menu handle there if action == MenuAction_End.

    Seems like a good plugin to be honest, I'll use it.
    I am completely new to SourcePawn, but I was under the impression that was unnecessary for panels since the handle can be closed right after sending it to the client (which is what it does already), unlike menus.
    Miu is offline
    shavit
    AlliedModders Donor
    Join Date: Dec 2011
    Location: Israel
    Old 11-15-2013 , 09:06   Re: [CS:S] Longjump Stats
    Reply With Quote #4

    Quote:
    Originally Posted by Miu View Post
    I am completely new to SourcePawn, but I was under the impression that was unnecessary for panels since the handle can be closed right after sending it to the client (which is what it does already), unlike menus.
    Whoop I thought it was a menu since you even named it Handle:hMenu in the handler function, sorry.
    __________________
    retired
    shavit is offline
    Miu
    Veteran Member
    Join Date: Nov 2013
    Old 11-15-2013 , 11:01   Re: [CS:S] Longjump Stats
    Reply With Quote #5

    Quote:
    Originally Posted by shavit View Post
    Whoop I thought it was a menu since you even named it Handle:hMenu in the handler function, sorry.
    ya my bad ^__^

    1.0.1:
    • fixed obvious bug, i'm dumb
    • now tracks degrees turned
    • beam more smooth and now alternates color per strafe
    • added ladder stats
    Miu is offline
    Miu
    Veteran Member
    Join Date: Nov 2013
    Old 12-02-2013 , 06:22   Re: [CS:S] Longjump Stats
    Reply With Quote #6

    1.1.0:
    • added chat output and some stuff
    Miu is offline
    Miu
    Veteran Member
    Join Date: Nov 2013
    Old 12-05-2013 , 06:36   Re: [CS:S] Longjump Stats
    Reply With Quote #7

    1.1.1:
    • corrected some trace-related math
    • added sounds
    Miu is offline
    Miu
    Veteran Member
    Join Date: Nov 2013
    Old 12-05-2013 , 13:21   Re: [CS:S] Longjump Stats
    Reply With Quote #8

    1.1.2:
    • fixed small bug with sounds
    Miu is offline
    zipcore
    Veteran Member
    Join Date: Mar 2010
    Location: m_flZipcore
    Old 12-05-2013 , 19:35   Re: [CS:S] Longjump Stats
    Reply With Quote #9

    I've used your code to create a strafe hack detection plugin: https://forums.alliedmods.net/showthread.php?p=2068140
    __________________
    zipcore is offline
    shavit
    AlliedModders Donor
    Join Date: Dec 2011
    Location: Israel
    Old 12-08-2013 , 08:48   Re: [CS:S] Longjump Stats
    Reply With Quote #10

    Using that in my server, seems to work good.
    By the way, can you add cvars that will trigger the chat being printed for everybody? I don't like seeing any jump that's higher than 260 in chat, I changed it to 270 in my server.
    __________________
    retired

    Last edited by shavit; 12-08-2013 at 08:49.
    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 01:50.


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