Raised This Month: $ Target: $400
 0% 

[CSGO] A Sprint command for CSGO


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Austin
Senior Member
Join Date: Oct 2005
Plugin ID:
8354
Plugin Version:
1.1
Plugin Category:
All
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    A Sprint command for CSGO with optional slowdown, cooldown feedback messages and sounds.
    Old 01-04-2023 , 03:28   [CSGO] A Sprint command for CSGO
    Reply With Quote #1

    Description
    A Sprint command for CSGO with optional slowdown, cooldown and feedback messages and sounds.

    Feature list
    Implements a speed boost for a configurable amount of time.
    Optional slowdown time after the speed boost is used
    Configurable cooldown time
    Optional feedback messages
    Optional feedback sounds

    CVAR/Commands
    sm_abs_sprint
    The command to bind to a key to activate sprint.
    For example in the console type
    bind "q" "sm_abs_sprint"
    Use whatever free key you have or want for sprint instead of the "q" key in this example

    sm_abs_sprint_enabled
    Sprint Enabled = 1 or Disabled = 0

    sm_abs_sprint_duration
    Time in seconds speed boost will last
    Default = 6

    sm_abs_sprint_speed
    Speed boost amount
    Default = 1.50 times as fast

    sm_abs_sprint_slowdown_enabled;
    Sprint Slowdown Enabled = 1 or Disabled = 0
    When enabled player speed is slower than normal for a period of time after using sprint

    sm_abs_sprint_slowdown_duration;
    Time in seconds slowdown will last
    Default = 8
    If slowdown is enabled then the the time you have to wait before using sprint agin is:
    sm_abs_sprint_slowdown_duration + sm_abs_sprint_cooldown_duration

    sm_abs_sprint_slowdown_speed;
    Speed slowdown amount
    Default = 0.75 times as fast

    sm_abs_sprint_cooldown_duration
    Time in seconds to wait before using the speed boost again
    Default = 30

    sm_abs_sprint_showMessages
    Sprint Messages Enabled = 1 or Disabled = 0
    Colored messages will be shown for Sprint/Slowdown/Cooldown - Start/End

    sm_abs_sprint_playSounds
    Sprint Sounds Enabled = 1 or Disabled = 0
    Sounds will be Played for Sprint/Slowdown/Cooldown - Start/End

    sm_sm_abs_sprint_soundVolume
    Sprint Sounds Volume 0 to 50
    Default = 30
    Sets how loud the sounds will be

    Installation instructions
    Click the Get Plugin link below
    Put the ABS_CSGO_Sprint.smx file into your SourceMod plugins folder.

    Plans
    I implemented about everything I could think of for this but will consider
    adding "good" new ideas for it.
    The plugin is well tested but will fix any bugs if found.

    Credits
    The scripting techniques in this plugin came from the CSS version.
    Credit goes to St00ne / (and Bacardi Of Course!)
    https://forums.alliedmods.net/showth...ghlight=sprint
    Thank You!

    Changes from the original CSS version.
    1) Bug fix. At least for running under CSGO the original CSS plugin would crash if there was a
    map change while one of the timers were running, either in sprint or in cooldown timer.

    2) Enabling sprint with the use key has been removed since most of
    the time you don't want to also enable sprint with use.

    3) Added an optional slowdown feature where you move slower for a period of time after using sprint.

    4) Added features to optionally show messages and play sounds for the sprint states of
    Sprint/Slowdown/Cooldown - Start/End

    Changelog
    2023-01-04
    v1.0 Released
    v1.1 Released - Updated to newdecls required
    Attached Files
    File Type: sp Get Plugin or Get Source (ABS_CSGO_Sprint.sp - 180 views - 13.5 KB)

    Last edited by Austin; 01-04-2023 at 09:33. Reason: Updated to newdecls
    Austin is offline
    Bacardi
    Veteran Member
    Join Date: Jan 2010
    Location: mom's basement
    Old 01-04-2023 , 16:26   Re: [CSGO] A Sprint command for CSGO
    Reply With Quote #2

    yey
    Bacardi is offline
    Austin
    Senior Member
    Join Date: Oct 2005
    Old 01-04-2023 , 17:08   Re: [CSGO] A Sprint command for CSGO
    Reply With Quote #3

    Quote:
    Originally Posted by Bacardi View Post
    yey
    You are a Big Part of making this plugin
    and countless others possible….

    I looked at the source for SourceMod timers and didn't see the possibility of doing this.
    Is there a way from a valid running timer handle to get the remaining time for the timer?

    I would like to add to the messages...

    Instead of just saying "Still in Cooldown"
    I would say
    "Still in Cooldown for xx seconds"

    Or do I have to manage this myself by saving off the game time when I fire off the timers?
    If so Sourcemod feature request!

    tx bro
    Austin is offline
    Bacardi
    Veteran Member
    Join Date: Jan 2010
    Location: mom's basement
    Old 01-04-2023 , 19:49   Re: [CSGO] A Sprint command for CSGO
    Reply With Quote #4

    If you find my old posts, some of those sure have typos or errors what not necessary work,
    so understand what code do rather than copy/paste it blindly.
    I'm not great coder, I had just tried practise and looking old codes from here forum posts and plugins.

    You need to beware when using timer flag TIMER_FLAG_NO_MAPCHANGE
    and storing timer handle in array.
    What can happen is, running timer will "disappear" on map change but you have still handle of that timer what not exist anymore.
    - You KillTimer with that not exist timer handle, error.

    But if you not get those errors, good.


    About checking time left in timer, again, make variable array and store time etc. etc.

    Here is my example of cooldown and with time check.
    - I want separate array index and client userid when creating timer. So I know sure what array index I am following.

    But you do your own way, it is your plugin not mine
    Spoiler
    __________________
    Do not Private Message @me
    Bacardi is offline
    modderr
    Junior Member
    Join Date: Apr 2024
    Old 04-01-2024 , 21:42   Re: [CSGO] A Sprint command for CSGO
    Reply With Quote #5

    hello. I need a little help getting this mod working. I can see all of the sm_abs console commands so I know that it is installed correctly. when I press q on the keyboard it doesn't make a sound, also it doesn't run faster. sm_abs_sprint_playSounds is set to 1.

    I really want to get this working.
    any suggestions?
    csgo version 1.38
    modderr 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 21:19.


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