Raised This Month: $51 Target: $400
 12% 

[TF2] Change Class Speed v.2.0 (7/29/13)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Chaosxk
Veteran Member
Join Date: Aug 2010
Location: Westeros
Plugin ID:
3306
Plugin Version:
2.0
Plugin Category:
Server Management
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    For Team Fortress 2, allows server owners to change the speed of different classes.
    Old 10-19-2012 , 18:31   [TF2] Change Class Speed v.2.0 (7/29/13)
    Reply With Quote #1

    [TF2] Change Class Speed
    Version 2.0



    Introduction:
    This plugin is a fixed and rewritten version of this plugin: click
    It seems that the plugin was abandoned and broke. So i thought i could fix it up.
    This plugin allows you to alter the speed of any class of any team to any speed between 1-520.

    Convars:

    ccs_enabled (Default: 1) - Enables or disables the plugin.

    ccs_admin = (Default: 0) Should this plugin be enabled for admins only?
    1 - Admins only (Uses Admin Generic or can be overridden with ccs_adminflag)
    0 - Public

    ccs_scout_speed = (Default: 520) Sets speed for Scout from 1- 520
    ccs_soldier_speed = (Default: 520) Sets speed for Soldier from 1- 520
    ccs_pyro_speed = (Default: 520) Sets speed for Pyro from 1- 520
    ccs_demoman_speed = (Default: 520) Sets speed for Demoman from 1- 520
    ccs_heavy_speed = (Default: 520) Sets speed for Heavy from 1- 520
    ccs_engineer_speed = (Default: 520) Sets speed for Engineer from 1- 520
    ccs_medic_speed = (Default: 520) Sets speed for Medic from 1- 520
    ccs_sniper_speed = (Default: 520) Sets speed for Sniper from 1- 520
    ccs_spy_speed = (Default: 520) Sets speed for Spy from 1- 520

    Installation:

    - Install TF2Attributes: http://forums.alliedmods.net/showthread.php?t=210221
    - Place tf2classspeed.smx into your addons/sourcemod/plugins/ folder.
    - Place ccspeed_config into tf/configs/sourcemod
    - Refresh map or restart the server
    - Open up the config file ccspeed_config in tf/cfg/sourcemod to config the convars.


    Version Log:
    Code:
    2.0 - 
    - Did a complete code rewrite using TF2Attributes instead of OnGameFrame
    - Added CheckCommandAccess for ccs_adminflag to specify what admin level
    - Renamed the plugin and plugins from dynamicclassspeed to this
    Note: I just noticed that the old version had team specific convars... i'll fix this later -.-
    
    
    1.3 - 
    - Fixed the IsPlayerAlive Spam which lead to crashes
    - Renamed sm_setcs_slowdown to sm_slowdown_enabled (Remove dynamic_speed.cfg from tf/cfg/sourcemod so the plugin can regenerate it with the renamed convar)
    - Some code cleanup
    - Removed the loop for convar change hook
    
    1.2
    - Instead of hooking events to prevent bypassing pre-round freeze, it now checks and apply speed if player is greater than speed of 1.
    - Fixed a small bug and reset with the admin only convar
    
    1.1
    - Applied speed to players who are stunned
    - Heavy revving/sniper scoping/sniper readying speed is scaled depending on the speed you put.  (Can be disabled if you set the convar sm_setcs_slowdown to 0)
    - Fixed pre-round freeze, in arena mode.  Players should not be able to move until the 10 second countdown time is up.
    - Added admin only cvar.
    - Checks if the game is TF2.
    - Loads config file with cvars in tf/cfg/sourcemod
    
    1.0
    - Released
    Credits:

    - GNCMatt for giving me a better method
    - ReFlexPoison for making the code neater and getting current speed

    Feel free to post any bugs/problems or features added.

    LAST VERSION: 221 views
    Attached Files
    File Type: sp Get Plugin or Get Source (tf2classspeed.sp - 909 views - 8.3 KB)
    File Type: smx tf2classspeed.smx (7.1 KB, 748 views)
    File Type: cfg ccspeed_config.cfg (1.6 KB, 763 views)
    __________________

    Last edited by Chaosxk; 07-29-2013 at 23:00. Reason: update
    Chaosxk is offline
    scorpadorp
    SourceMod Donor
    Join Date: May 2012
    Location: NC
    Old 10-19-2012 , 18:32   Re: [TF2] Dynamic Class Speed
    Reply With Quote #2

    Why is it per team and not per player?
    scorpadorp is offline
    Chaosxk
    Veteran Member
    Join Date: Aug 2010
    Location: Westeros
    Old 10-19-2012 , 18:34   Re: [TF2] Dynamic Class Speed
    Reply With Quote #3

    Because that already exists,
    http://forums.alliedmods.net/showthread.php?t=144131

    This allows you to change speed on a class or team, or both.
    __________________

    Last edited by Chaosxk; 10-19-2012 at 18:34.
    Chaosxk is offline
    OnlyBrian
    Member
    Join Date: Jul 2012
    Old 10-19-2012 , 22:20   Re: [TF2] Dynamic Class Speed
    Reply With Quote #4

    Will this carry over to the next round as well? I've been looking for something like this.
    __________________
    OnlyBrian is offline
    Chaosxk
    Veteran Member
    Join Date: Aug 2010
    Location: Westeros
    Old 10-20-2012 , 00:55   Re: [TF2] Dynamic Class Speed
    Reply With Quote #5

    Yes, if you saved the commands in your server.cfg
    For example:
    sm_setcs red pyro 400
    sm_setcs red demo 400
    sm_setcs red heavy 400
    ...and so on

    It will carry on to every map change. Should say that when you load the plugin, you should refresh the map or restart the server so that the settings are set. Or you can apply them manually through console which can take a while...but not worth it.
    __________________
    Chaosxk is offline
    ReFlexPoison
    ☠☠☠
    Join Date: Jul 2011
    Location: ☠☠☠
    Old 10-20-2012 , 01:31   Re: [TF2] Dynamic Class Speed
    Reply With Quote #6

    Quote:
    Originally Posted by Chaosxk View Post
    ReflexPoison for making the code neater and getting current speed
    I hope you see what is wrong with that sentence
    ReFlexPoison is offline
    FlaminSarge
    Veteran Member
    Join Date: Jul 2010
    Old 10-20-2012 , 04:26   Re: [TF2] Dynamic Class Speed
    Reply With Quote #7

    One issue I can see with this is that it'll let people who are stunned still run at normal speed. In addition, revving Heavies and scoped-in Snipers will run at the speed set for their class instead of scaling it appropriately based on the condition.

    In addition, max speeds are set to 1 on round start (preround freeze for arena/non-arena). This lets people bypass preround freeze.
    __________________
    Bread EOTL GunMettle Invasion Jungle Inferno 64-bit will break everything. Don't even ask.

    All plugins: Randomizer/GiveWeapon, ModelManager, etc.
    Post in plugin threads with questions.
    Steam is for playing games.
    You will be fed to javalia otherwise.
    Psyduck likes replays.

    Last edited by FlaminSarge; 10-20-2012 at 04:27.
    FlaminSarge is offline
    Chaosxk
    Veteran Member
    Join Date: Aug 2010
    Location: Westeros
    Old 10-22-2012 , 19:29   Re: [TF2] Dynamic Class Speed (1.1)
    Reply With Quote #8

    Updated to 1.1
    - Applied speed to players who are stunned
    - Heavy revving/sniper scoping/sniper readying speed is scaled depending on the speed you put. (Can be disabled if you set the convar sm_setcs_slowdown to 0)
    - Fixed pre-round freeze, in arena mode. Players should not be able to move until the 10 second countdown time is up.
    - Added admin only cvar.
    - Checks if the game is TF2.
    - Loads config file with cvars in tf/cfg/sourcemod
    __________________
    Chaosxk is offline
    C0nw0nk
    Senior Member
    Join Date: May 2011
    Location: United Kingdom
    Old 10-22-2012 , 22:28   Re: [TF2] Dynamic Class Speed (1.1)
    Reply With Quote #9

    Awesome plugin Looks realy fun.

    EDIT : Tested it and i could not move... no matter what i set the values to i was stuck in the same position... it could not be compatible with other plugins i think it might be SMAC or something.
    __________________

    Last edited by C0nw0nk; 10-22-2012 at 22:48.
    C0nw0nk is offline
    Send a message via MSN to C0nw0nk
    FlaminSarge
    Veteran Member
    Join Date: Jul 2010
    Old 10-22-2012 , 22:46   Re: [TF2] Dynamic Class Speed (1.1)
    Reply With Quote #10

    The time for preround freeze (it's not just arena) is variable. I'd suggest having your check only apply speeds if the client's speed is already above 1, and removing any timers for 10 seconds or whatever.
    __________________
    Bread EOTL GunMettle Invasion Jungle Inferno 64-bit will break everything. Don't even ask.

    All plugins: Randomizer/GiveWeapon, ModelManager, etc.
    Post in plugin threads with questions.
    Steam is for playing games.
    You will be fed to javalia otherwise.
    Psyduck likes replays.
    FlaminSarge 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 01:56.


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