Raised This Month: $89 Target: $400
 22% 

[TF2] Set Speed


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Tylerst
Veteran Member
Join Date: Oct 2010
Plugin ID:
2103
Plugin Version:
1.4.0
Plugin Category:
Admin Commands
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    283 
    Plugin Description:
    Set the speed of the target(s)
    Old 11-29-2010 , 09:15   [TF2] Set Speed
    Reply With Quote #1

    TF2 Set Speed

    Description: Set the speed of the target(s)

    Cvars(default valuses shown):
    sm_setspeed_version "1.4.0"
    sm_setspeed_chat "1" - Enable/Disable(1/0) chat of speed changes
    sm_setspeed_log "1" - Enable/Disable(1/0) logging of speed changes

    Commands:
    sm_setspeed "target" "speed 0-520" - Default Slay Flag
    sm_resetspeed "target" - Default Slay Flag
    sm_unsetspeed "target" - Same as sm_resetspeed

    Examples:
    sm_setspeed Thetarget 300
    sm_setspeed @me 350
    sm_setspeed @!me 100
    sm_setspeed @bots 10
    sm_setspeed @all 520
    sm_setspeed @blue 333
    sm_setspeed @red 99.99999

    Class Base Speed Reference:
    Scout - 400
    Soldier - 240
    Pyro - 300
    Demoman - 280
    Heavy - 230
    Engineer - 300
    Medic - 320
    Sniper - 300
    Spy - 300

    Changelog:
    Code:
    Version 1.0.0 - November 29, 2010
    * Initial Release
     
    Version 1.1.0 - December 7, 2010
    * Bug fix for mapchange
     
    Version 1.2.0 - February 12, 2011
    * Coding change for bug fixes
     
    Version 1.3.0 - November 2, 2011
    * Complete plugin rewrite - More stability and optimization + newer TF2 Natives
    * Uses AskPluginLoad2 instead of a custom forward to check the game
    * Uses OnGameFrame instead of a bunch of repeating timers
    * Checks for charge condition so as not to interfere with Demoman charging
    * Upped max speed to account for TF2's new 450 limit
    
    Version 1.3.1 - June 28, 2012
    *Upped max speed to account for TF2's new 520 limit.
    
    Version 1.4.0 - June 28, 2014 //Exactly 2 years; not planned believe it or not
    *Huge Code Overhaul
    *Changed from OnGameFrame to SDKHooks_OnPreThink
    *Changed how sm_resetspeed removes speed so that it now instant rather than on weapon change
    *Added alt command sm_unsetspeed which functions the same as sm_resetspeed
    *File name changed from TF2 Set Speed to SetSpeed !Note: Make sure you remove old name one!)
    Attached Files
    File Type: sp Get Plugin or Get Source (SetSpeed.sp - 4848 views - 4.5 KB)

    Last edited by Tylerst; 06-28-2014 at 06:10. Reason: Big Update
    Tylerst is offline
    Drakhen
    New Member
    Join Date: Nov 2010
    Old 12-06-2010 , 13:26   Re: [TF2] Set Speed
    Reply With Quote #2

    L 12/06/2010 - 12:21:10: [SM] Native "KillTimer" reported: Invalid timer handle c500a6 (error 3) L 12/06/2010 - 12:21:10: [SM] Displaying call stack trace for plugin "TF2 Set Speed.smx": L 12/06/2010 - 12:21:10: [SM] [0] Line 75, TF2 Set Speed.sp::Command_Speed() On first server load the plugin works fine but on map change i get this in my error log, and the plugin will not work.
    Drakhen is offline
    FoxMulder
    Senior Member
    Join Date: Jan 2009
    Location: Orlando, FL
    Old 12-06-2010 , 13:36   Re: [TF2] Set Speed
    Reply With Quote #3

    Just change

    PHP Code:
    SpeedTimers[target_list[i]] = CreateTimer(0.1SetSpeeduseridTIMER_REPEAT)

    //to

    SpeedTimers[target_list[i]] = CreateTimer(0.1SetSpeeduseridTIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE
    __________________
    FoxMulder is offline
    Tylerst
    Veteran Member
    Join Date: Oct 2010
    Old 12-06-2010 , 16:52   Re: [TF2] Set Speed
    Reply With Quote #4

    Updated
    Tylerst is offline
    Drakhen
    New Member
    Join Date: Nov 2010
    Old 12-06-2010 , 18:28   Re: [TF2] Set Speed
    Reply With Quote #5

    L 12/06/2010 - 17:25:23: [SM] Native "KillTimer" reported: Invalid timer handle af00a5 (error 1) L 12/06/2010 - 17:25:23: [SM] Displaying call stack trace for plugin "TF2 Set Speed.smx": L 12/06/2010 - 17:25:23: [SM] [0] Line 75, TF2 Set Speed.sp::Command_Speed() Still get errors in logs on map change and plugin stops working.
    Drakhen is offline
    Tylerst
    Veteran Member
    Join Date: Oct 2010
    Old 12-07-2010 , 06:04   Re: [TF2] Set Speed
    Reply With Quote #6

    Alright, I fixed it for real this time.
    Added code to set handle on map end

    Last edited by Tylerst; 12-07-2010 at 06:08.
    Tylerst is offline
    Drakhen
    New Member
    Join Date: Nov 2010
    Old 12-07-2010 , 10:57   Re: [TF2] Set Speed
    Reply With Quote #7

    Everything is working great thanks for the fast fix.
    Drakhen is offline
    xomp
    BANNED
    Join Date: Jul 2008
    Old 01-16-2011 , 18:51   Re: [TF2] Set Speed
    Reply With Quote #8

    You should add some way to reset the speed. For example say I am traveling as a Heavy at Scout speeds and want to toggle it on/off I can just /sm_setspeed @me 0 to put the Heavy back to his normal speed.
    xomp is offline
    Send a message via Skype™ to xomp
    Tylerst
    Veteran Member
    Join Date: Oct 2010
    Old 02-05-2011 , 05:31   Re: [TF2] Set Speed
    Reply With Quote #9

    Quote:
    Originally Posted by xomp View Post
    You should add some way to reset the speed. For example say I am traveling as a Heavy at Scout speeds and want to toggle it on/off I can just /sm_setspeed @me 0 to put the Heavy back to his normal speed.
    Uh.. Did you read the command list in my first post ? I already have one.(sm_resetspeed <target>)

    Last edited by Tylerst; 02-05-2011 at 05:33.
    Tylerst is offline
    xomp
    BANNED
    Join Date: Jul 2008
    Old 02-05-2011 , 15:25   Re: [TF2] Set Speed
    Reply With Quote #10

    Quote:
    Originally Posted by Tylerst View Post
    Uh.. Did you read the command list in my first post ? I already have one.(sm_resetspeed <target>)
    Wow, I totally did not see that lol. On another note, this sometimes seems to not work. Nothing in the error logs and no console message, it just simply does nothing at all.
    xomp is offline
    Send a message via Skype™ to xomp
    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 06:22.


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