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

TF2 Class Restrictions 0.6 (Updated 08/13/09)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Plugin ID:
434
Plugin Version:
0.6.1
Plugin Category:
Server Management
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    212 
    Plugin Description:
    Restrict classes in TF2.
    Old 06-22-2008 , 17:14   TF2 Class Restrictions 0.6 (Updated 2020/08/05)
    Reply With Quote #1

    I know there's already a class restriction plugin, I just think this one works neater. Credits go to voogru for the idea, and for telling me how to show the class selection screen to players A video of his version can be found at http://www.youtube.com/watch?v=OgBt-KtjxyA, I just based it off of the video. The cvars are:

    sm_classrestrict_enabled (0/1, default 1)
    Enable/disable restricting classes in TF2.

    sm_classrestrict_flags (default "")
    Admin flags for restricted classes in TF2.

    sm_classrestrict_immunity (0/1, default 0)
    Enable/disable admins being immune for restricted classes in TF2.

    sm_classrestrict_blu_demomen
    sm_classrestrict_blu_engineers
    sm_classrestrict_blu_heavies
    sm_classrestrict_blu_medics
    sm_classrestrict_blu_pyros
    sm_classrestrict_blu_scouts
    sm_classrestrict_blu_snipers
    sm_classrestrict_blu_soldiers
    sm_classrestrict_blu_spies

    Limits for Blu classes in TF2. (-1 for no limit, anything higher will be the limit for that class. Default -1)

    sm_classrestrict_red_demomen
    sm_classrestrict_red_engineers
    sm_classrestrict_red_heavies
    sm_classrestrict_red_medics
    sm_classrestrict_red_pyros
    sm_classrestrict_red_scouts
    sm_classrestrict_red_snipers
    sm_classrestrict_red_soldiers
    sm_classrestrict_red_spies

    Limits for Red classes in TF2.

    You can put any of these cvars in server.cfg or sourcemod.cfg, and then if you want map specific cvars you can make a file called mapname.cfg (for example cp_dustbowl.cfg) and put those cvars in there.

    Changelog
    • 0.6
      • Fixed limits being off by 1.
      • Added percentage based limits.
      • Added class immunity.
    • 0.5
      • Fixed skin glitch.
      • Fixed admin immunity.
      • Fixed not blocking on first spawn on Arena maps.
    • 0.4
      • Added admin immunity.
      • Also blocked join_class command.
    • 0.3
      • Should actually work now, but I don't have the time anymore today to thoroughly test it. Will test tomorrow. No added features yet.
    • 0.2
      • Initial release.
    Attached Files
    File Type: sp Get Plugin or Get Source (classrestrict.sp - 4483 views - 7.8 KB)
    __________________
    Advertisements | REST in Pawn - HTTP client for JSON REST APIs
    Please do not PM me with questions. Post in the plugin thread.

    Last edited by DJ Tsunami; 08-05-2020 at 05:38.
    DJ Tsunami is offline
    bl4nk
    SourceMod Developer
    Join Date: Jul 2007
    Old 06-22-2008 , 17:31   Re: TF2 Class Restrictions
    Reply With Quote #2

    Quote:
    Originally Posted by DJ Tsunami View Post
    Also, it doesn't have admin immunity yet, if enough people want that I'll add it later.
    Do it.
    bl4nk is offline
    BrutalGoerge
    AlliedModders Donor
    Join Date: Jul 2007
    Old 06-22-2008 , 17:45   Re: TF2 Class Restrictions
    Reply With Quote #3

    hey, it's trying to download sound files now that I have installed this...
    did you forgot to add them to the post or something?
    __________________
    My Pluggies If you like, consider to me.
    BrutalGoerge is offline
    DJ Tsunami
    DJ Post Spammer
    Join Date: Feb 2008
    Location: The Netherlands
    Old 06-22-2008 , 18:09   Re: TF2 Class Restrictions
    Reply With Quote #4

    No, they're already included with TF2, so I figured it wouldn't try to download them...

    Edit: oh sorry, I think I see the problem. Hopefully fixed
    __________________
    Advertisements | REST in Pawn - HTTP client for JSON REST APIs
    Please do not PM me with questions. Post in the plugin thread.

    Last edited by DJ Tsunami; 06-22-2008 at 18:18.
    DJ Tsunami is offline
    BrutalGoerge
    AlliedModders Donor
    Join Date: Jul 2007
    Old 06-22-2008 , 18:39   Re: TF2 Class Restrictions
    Reply With Quote #5

    thank you sir
    __________________
    My Pluggies If you like, consider to me.
    BrutalGoerge is offline
    BrutalGoerge
    AlliedModders Donor
    Join Date: Jul 2007
    Old 06-22-2008 , 22:20   Re: TF2 Class Restrictions
    Reply With Quote #6

    there were 4 pyros, i set it to 3, if people change class thru console, does this plugin block it?
    __________________
    My Pluggies If you like, consider to me.

    Last edited by BrutalGoerge; 06-22-2008 at 22:35.
    BrutalGoerge is offline
    DJ Tsunami
    DJ Post Spammer
    Join Date: Feb 2008
    Location: The Netherlands
    Old 06-23-2008 , 06:50   Re: TF2 Class Restrictions
    Reply With Quote #7

    Yes, the plugin blocks it too then. Unfortunately I can't reproduce what you're saying.
    __________________
    Advertisements | REST in Pawn - HTTP client for JSON REST APIs
    Please do not PM me with questions. Post in the plugin thread.
    DJ Tsunami is offline
    fattitj
    Member
    Join Date: Nov 2006
    Old 06-23-2008 , 10:08   Re: TF2 Class Restrictions
    Reply With Quote #8

    i get this error when im using this plugin, and the plugin is not working
    Code:
    L 06/23/2008 - 16:07:02: [TF2] Could not locate CalcCritical - Disabling Critical Hit forward
    L 06/23/2008 - 16:07:02: [TF2] Could not locate CalcCriticalMelee - Disabling Critical Hit forward
    L 06/23/2008 - 16:07:02: [TF2] Could not locate CalcCriticalKnife - Disabling Critical Hit forward
    L 06/23/2008 - 16:07:02: [TF2] No critical hit forwards could be initialised - Disabled critical hit hooks

    Last edited by fattitj; 06-23-2008 at 10:12.
    fattitj is offline
    DontWannaName
    Veteran Member
    Join Date: Jun 2007
    Location: VALVe Land, WA
    Old 06-23-2008 , 11:08   Re: TF2 Class Restrictions
    Reply With Quote #9

    I can already see players being like wtf why cant i be a pyro since theres no message at the time of selection that tells them its full. Can you redirect them to chat when they select? Immunity is also nice
    __________________

    DontWannaName is offline
    DJ Tsunami
    DJ Post Spammer
    Join Date: Feb 2008
    Location: The Netherlands
    Old 06-23-2008 , 14:42   Re: TF2 Class Restrictions
    Reply With Quote #10

    Well, chat hides behind the class selection screen, so I think I can only do something like center or hint text. But that's what I liked about this plugin, it plays the sound of the class you selected saying No, so that's the notification that you can't select the class

    @fattitj: I'm not using any of those forwards, so I'm not sure why it's giving those errors.

    @bl4nk: I compiled it with 1.0.4 and it worked for me, I don't know if 1.1.0 would give those errors.
    __________________
    Advertisements | REST in Pawn - HTTP client for JSON REST APIs
    Please do not PM me with questions. Post in the plugin thread.

    Last edited by DJ Tsunami; 06-23-2008 at 14:46.
    DJ Tsunami 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:16.


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