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

[TF2] Set Player Class


Post New Thread Reply   
 
Thread Tools Display Modes
Author
DarthNinja
SourceMod Plugin Approver
Join Date: Mar 2009
Location: PreThinkHook()
Plugin ID:
2625
Plugin Version:
1.0.1
Plugin Category:
Fun Stuff
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    25 
    Plugin Description:
    Manually forces clients to a class.
    Old 10-29-2011 , 04:13   [TF2] Set Player Class
    Reply With Quote #1

    [TF2] Set Player Class
    Version 1.0.1




    Description:
    This will force a client to instantly switch to another class. They will not die and their items will remain the same for their previous class.
    This as you may expect allows for some pretty funny screenshots.

    For Example...




    Commands:
    • sm_setplayerclass <client> [class]
      • Class can be left blank for a random choice

    Cvars:
    • sm_setplayerclass_version
      • Plugin Version
    Install Instructions:
    1. Place SetClass.smx into your addons/sourcemod/plugins/ folder.
    Notes:
    • This is not exactly the same as This Plugin. Mine does not refresh items so you can have a scout loadout on a heavy as pictured above.
      I was not aware of the above plugin when I threw this together.
    • This plugin is intended more for fun then for any practical value.

    Version History:
    • V1.0.0
      • Initial Release
    • V1.0.1
      • Added fix for client entering an invalid class.
    Total downloads as prior to last edit: 48
    Attached Files
    File Type: sp Get Plugin or Get Source (SetClass.sp - 3767 views - 2.1 KB)
    __________________

    Last edited by DarthNinja; 10-31-2011 at 07:36.
    DarthNinja is offline
    DarthNinja
    SourceMod Plugin Approver
    Join Date: Mar 2009
    Location: PreThinkHook()
    Old 10-29-2011 , 04:19   Re: [TF2] Set Player Class
    Reply With Quote #2

    ~Reserved~
    __________________
    DarthNinja is offline
    Snaggle
    AlliedModders Donor
    Join Date: Jul 2010
    Location: England
    Old 10-29-2011 , 12:59   Re: [TF2] Set Player Class
    Reply With Quote #3

    Awesome. I use the plugin you linked to but this one can be used with it for fun!
    Snaggle is offline
    Sreaper
    髪を用心
    Join Date: Nov 2009
    Old 10-29-2011 , 15:14   Re: [TF2] Set Player Class
    Reply With Quote #4

    Nice work, thanks!

    Last edited by Sreaper; 10-30-2011 at 14:11.
    Sreaper is offline
    imoda
    Member
    Join Date: Apr 2010
    Old 10-29-2011 , 20:54   Re: [TF2] Set Player Class
    Reply With Quote #5

    Seems to be crashing clients (not the server) when 'undefined.cfg not present; not executing;'

    Last edited by imoda; 10-29-2011 at 20:58.
    imoda is offline
    DarthNinja
    SourceMod Plugin Approver
    Join Date: Mar 2009
    Location: PreThinkHook()
    Old 10-30-2011 , 21:19   Re: [TF2] Set Player Class
    Reply With Quote #6

    Quote:
    Originally Posted by imoda View Post
    Seems to be crashing clients (not the server) when 'undefined.cfg not present; not executing;'
    Hmm, I haven't seen that issue. (Also I don't have that config).
    Can you provide any more info?
    __________________
    DarthNinja is offline
    imoda
    Member
    Join Date: Apr 2010
    Old 10-30-2011 , 23:14   Re: [TF2] Set Player Class
    Reply With Quote #7

    Quote:
    Originally Posted by DarthNinja View Post
    Hmm, I haven't seen that issue. (Also I don't have that config).
    Can you provide any more info?
    It's only happened when using 'random' or any other non class name, ie

    Code:
    sm_setplayerclass @me random
    sm_setplayerclass @me scoot
    imoda is offline
    DarthNinja
    SourceMod Plugin Approver
    Join Date: Mar 2009
    Location: PreThinkHook()
    Old 10-31-2011 , 07:33   Re: [TF2] Set Player Class
    Reply With Quote #8

    Well that's a good example of garbage in garbage out.
    __________________
    DarthNinja is offline
    FlaminSarge
    Veteran Member
    Join Date: Jul 2010
    Old 11-01-2011 , 04:23   Re: [TF2] Set Player Class
    Reply With Quote #9

    This is a fancy version of /changeclass from http://hg.alliedmods.net/sourcemod-c...te/tf2-test.sp isn't it?
    __________________
    Bread EOTL GunMettle Invasion Jungle Inferno 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
    DarthNinja
    SourceMod Plugin Approver
    Join Date: Mar 2009
    Location: PreThinkHook()
    Old 11-01-2011 , 16:13   Re: [TF2] Set Player Class
    Reply With Quote #10

    Quote:
    Originally Posted by FlaminSarge View Post
    This is a fancy version of /changeclass from http://hg.alliedmods.net/sourcemod-c...te/tf2-test.sp isn't it?
    I've never seen that plugin, but yes they both use TF2_SetPlayerClass.
    __________________
    DarthNinja is offline
    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 17:23.


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