AlliedModders

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

MoggieX 07-03-2009 19:14

[TF2] Class Speed Changer
 
1 Attachment(s)
PHP Code:

/**
* TF2 C L A S S  S P E E D
*
* Description:
*    This plugin allows you to alter the speed of different classes in TF2
*
* Notes
*    Setting a speed above 400 appears to make no effect
*
* Usage:
*    sm_csc_enabled    - Enable/Disable TF2 Class Speed, Deault = 1
*    sm_csc_adminonly    - Restricts the use to admins only, Default = 0
*    sm_csc_reset        - Resets the speeds back to their defaults

* cvars
*    Use sm_cvar to check or set any of the following, rembering u can use sm_tcs_reset ro reset them back to the deafults
*
*    // Blue Team
*     sm_csc_blue_demoman        - For the demoman
*    sm_csc_blue_engineer        - ''
*    sm_csc_blue_heavy        - ''
*    sm_csc_blue_medic        - ''
*    sm_csc_blue_pyro        - ''
*    sm_csc_blue_scout        - ''
*    sm_csc_blue_sniper        - ''
*    sm_csc_blue_soldier        - ''
*    sm_csc_blue_spy        - ''
*
*    // Red Team
*     sm_csc_red_demoman        - For the demoman
*    sm_csc_red_engineer        - ''
*    sm_csc_red_heavy        - ''
*    sm_csc_red_medic        - ''
*    sm_csc_red_pyro        - ''
*    sm_csc_red_scout        - ''
*    sm_csc_red_sniper        - ''
*    sm_csc_red_soldier        - ''
*    sm_csc_red_spy        - ''
*
* Thanks to:
*     Tsunami for my n00b questions
*    
* Based upon:
*    -
*  
* Last Update
*     08 July 2009
*
* Known ToDos
*    Timers for Spy, Heavies and Sniper to set their speed as it can alter as there is no wepaon switch event to nab
*
*
* Version History
*     1.0 - After a few attempts :-P
*    2.0 - Added ability to change per team speeds, altered cvars and handles to a better naming standard
*     
*/ 


Mnkras 07-05-2009 18:44

Re: [TF2] Class Speed Changer
 
on your todo can you i guess make it so if you hold a certain weapon like melee you runn faster?

Gachl 07-05-2009 18:58

Re: [TF2] Class Speed Changer
 
Is it possible with this script to set a speed > 400?
If yes may I use it in my tf2 credit plugin to buy it (I'll keep your credits)?

noodleboy347 07-05-2009 23:25

Re: [TF2] Class Speed Changer
 
Quote:

Originally Posted by Gachl (Post 865237)
Is it possible with this script to set a speed > 400?
If yes may I use it in my tf2 credit plugin to buy it (I'll keep your credits)?

I think you can do sm_cvar tf_maxspeed 900, because the default is 400. I don't know if it works, I haven't tested it, but that would be great?

By the way, I'm using this plugin on my server for admins only, it's great! Only a couple bugs, like when you disguise as a Spy you get slowed down, and when you revv up as a Heavy you get slowed down after you spin down.

retsam 07-05-2009 23:35

Re: [TF2] Class Speed Changer
 
No you cannot go over 400.

MoggieX 07-06-2009 03:27

Re: [TF2] Class Speed Changer
 
Quote:

Originally Posted by Mnkras (Post 865226)
on your todo can you i guess make it so if you hold a certain weapon like melee you runn faster?

Yes absolutely, me thinks when I got an axe/melee weapon out I should get a speed increase, just like with the knife in CSS. I'm not entirely sure if its posisble

Quote:

Originally Posted by noodleboy347 (Post 865393)
I think you can do sm_cvar tf_maxspeed 900, because the default is 400. I don't know if it works, I haven't tested it, but that would be great?

By the way, I'm using this plugin on my server for admins only, it's great! Only a couple bugs, like when you disguise as a Spy you get slowed down, and when you revv up as a Heavy you get slowed down after you spin down.

LOL, I had started this originally to slow down the durty spies ;-) Thanks for the heads up though, it kinda hinges on being able to detect they've switched weapons or not.

Matt

retsam 07-06-2009 03:48

Re: [TF2] Class Speed Changer
 
The only way to change classes speed for heavy/sniper/spy is to put a repeating timer on them. All 3 of those classes will revert back to their normal speeds, switching weapons, firing minigun and cloaking/decloaking. (unfortunately). That is the only way I was able to keep speeds maintained in a rtd plugin of mine.

Antithasys 07-08-2009 05:26

Re: [TF2] Class Speed Changer
 
Please update first post with public cvar in your code.

Once done plugin will be approved.

MoggieX 07-08-2009 05:30

Re: [TF2] Class Speed Changer
 
Quote:

Originally Posted by Antithasys (Post 867089)
Please update first post with public cvar in your code.

Once done plugin will be approved.

Morning,

*coff* I did when creating the post ;-)

I have some changes to load first and then I'll amend the post details :)

Matt

MoggieX 07-08-2009 09:56

Re: [TF2] Class Speed Changer
 
Updated to be able to swap based upon team, will add the timers when I'm not at work ;-)

Matt


All times are GMT -4. The time now is 03:34.

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