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

[TF2] Class Ban plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Facksy
Senior Member
Join Date: Apr 2017
Location: +2+2
Plugin ID:
6245
Plugin Version:
1.0
Plugin Category:
Admin Commands
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Ban players from playing specific class
    Old 09-03-2018 , 14:11   [TF2] Class Ban plugin
    Reply With Quote #1

    Description:

    This plugin allow admins to ban players from specific class, this is useful in server with gamemod like ff2 to ban delayers who hide from the boss with scout or spy or pyro
    The plugin use cookie so changes are saved
    Admins with ADMFLAG_SLAY have access to it, feel free to change it to what you want.

    Commands:
    "sm_classban": Open a menu with all players online
    "sm_banclass": //
    "sm_banclass" <players>: Open a menu with all banned class of the player;
    "sm_banclass" <players> <class>: Ban the player from the specific class or reply a message if the player is already banned from this class or if the player is enoughly classbanned;

    Cvar:
    CreateConVar("sm_maxclassban", "4", "Max classban per player");

    Here is a video showing how the plugin works


    Credit:
    Thanks DJ Tsunami for his plugin TF2 Class Restriction, i took some code from there.
    Thanks asherkin and hmmmmmmmmmmmmmmmmmmmmmmmmmm for their help about bits.
    Attached Files
    File Type: sp Get Plugin or Get Source (AClassBan.sp - 896 views - 8.2 KB)
    __________________
    My Steam I take private requests if related with TF2
    My Plugins

    Last edited by asherkin; 05-15-2020 at 12:27.
    Facksy is offline
    rengo
    Member
    Join Date: Jun 2015
    Old 09-04-2018 , 19:17   Re: [TF2] Class Ban plugin
    Reply With Quote #2

    Can you add @all? to block all players some special class?
    __________________
    rengo is offline
    Send a message via AIM to rengo
    ddhoward
    Veteran Member
    Join Date: May 2012
    Location: California
    Old 09-04-2018 , 20:32   Re: [TF2] Class Ban plugin
    Reply With Quote #3

    Quote:
    Originally Posted by rengo View Post
    Can you add @all? to block all players some special class?
    https://forums.alliedmods.net/showthread.php?p=642353
    __________________
    ddhoward is offline
    Hoto Cocoa
    Senior Member
    Join Date: Jun 2018
    Location: Somewhere
    Old 12-08-2019 , 08:34   Re: [TF2] Class Ban plugin
    Reply With Quote #4

    no such cookie "sm_clientclassban" when using sm_cookies

    L 12/08/2019 - 22:04:54: [SM] Blaming: AClassBan.smx
    L 12/08/2019 - 22:04:54: [SM] Call stack trace:
    L 12/08/2019 - 22:04:54: [SM] [1] Line 280, /home/forums/content/files/2/7/8/9/1/3/171232.attach::AttemptClassBan
    L 12/08/2019 - 22:04:54: [SM] [2] Line 150, /home/forums/content/files/2/7/8/9/1/3/171232.attach::sm_classban
    L 12/08/2019 - 22:07:40: [SM] Exception reported: Array index out-of-bounds (index -1, limit 64)
    L 12/08/2019 - 22:07:40: [SM] Blaming: AClassBan.smx
    L 12/08/2019 - 22:07:40: [SM] Call stack trace:
    L 12/08/2019 - 22:07:40: [SM] [1] Line 280, /home/forums/content/files/2/7/8/9/1/3/171232.attach::AttemptClassBan
    L 12/08/2019 - 22:07:40: [SM] [2] Line 150, /home/forums/content/files/2/7/8/9/1/3/171232.attach::sm_classban

    Last edited by Hoto Cocoa; 12-08-2019 at 09:08.
    Hoto Cocoa 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 16:37.


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