AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Set Speed (https://forums.alliedmods.net/showthread.php?t=144131)

Tylerst 11-29-2010 10:15

[TF2] Set Speed
 
1 Attachment(s)
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!)


Drakhen 12-06-2010 14:26

Re: [TF2] Set Speed
 
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.

FoxMulder 12-06-2010 14:36

Re: [TF2] Set Speed
 
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


Tylerst 12-06-2010 17:52

Re: [TF2] Set Speed
 
Updated

Drakhen 12-06-2010 19:28

Re: [TF2] Set Speed
 
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.

Tylerst 12-07-2010 07:04

Re: [TF2] Set Speed
 
Alright, I fixed it for real this time. :D
Added code to set handle on map end

Drakhen 12-07-2010 11:57

Re: [TF2] Set Speed
 
Everything is working great thanks for the fast fix.

xomp 01-16-2011 19:51

Re: [TF2] Set Speed
 
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.

Tylerst 02-05-2011 06:31

Re: [TF2] Set Speed
 
Quote:

Originally Posted by xomp (Post 1395140)
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 :shock: ? I already have one.(sm_resetspeed <target>)

xomp 02-05-2011 16:25

Re: [TF2] Set Speed
 
Quote:

Originally Posted by Tylerst (Post 1407535)
Uh.. Did you read the command list in my first post :shock: ? 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.


All times are GMT -4. The time now is 12:49.

Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.