Monthly Target: $400 Donations: $131
 32% 

[TF2] StopBotsFromPlayingEngineer


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Nephyrin
SourceMod Donor
Join Date: Mar 2008
Plugin ID:
2342
Plugin Version:
1.0
Plugin Category:
Server Management
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    4 
    Plugin Description:
    Stops TFBots from choosing the Engineer class, fixing the crash bug currently plaguing servers with bots.
    Old 05-17-2011 , 23:13   [TF2] StopBotsFromPlayingEngineer
    Reply With Quote #1

    StopBotsFromPlayingEngineer

    Stops bots from playing the engineer class. This fixes the current (as of May 17, 2011) crash from having TFBots enabled

    cvars
    • sm_sbfpe_class - The class which bots who try to spawn as engineer should end up as instead. Default medic.

    Attached Files
    File Type: sp Get Plugin or Get Source (StopBotsFromPlayingEngineer.sp - 1085 views - 2.1 KB)

    Last edited by Nephyrin; 05-17-2011 at 23:40. Reason: grammar
    Nephyrin is offline
    bluechester
    SourceMod Donor
    Join Date: Nov 2008
    Old 05-17-2011 , 23:33   Re: [TF2] StopBotsFromPlayingEngineer
    Reply With Quote #2

    I love you.
    bluechester is offline
    Extreme_One
    Veteran Member
    Join Date: Nov 2006
    Old 06-05-2011 , 07:20   Re: [TF2] StopBotsFromPlayingEngineer
    Reply With Quote #3

    Great plugin.

    Couple of suggestions:

    Would be nice if instead of changing all engie's to one certain class it randomly selected one of the remaining classes.

    Like this:

    sm_sbfpe_class "random"

    Also how about giving people the option to list a few choices of class instead of just one:

    Like this:

    sm_sbfpe_class "soldier,sniper,spy"
    __________________
    Extreme_One is offline
    Natural
    New Member
    Join Date: Oct 2009
    Old 07-22-2011 , 12:16   Re: [TF2] StopBotsFromPlayingEngineer
    Reply With Quote #4

    Sry, this does not run for me. Got an error on compiling
    __________________
    Natural is offline
    DarthNinja
    SourceMod Plugin Approver
    Join Date: Mar 2009
    Location: PreThinkHook()
    Old 11-17-2011 , 22:40   Re: [TF2] StopBotsFromPlayingEngineer
    Reply With Quote #5

    Approved.
    Although I think the crash has been fixed, this can still be used to prevent bots from playing engineer.
    Might be useful if this plugin was updated to restrict other classes as well (maybe also a setting to allow x number of a class rather then just a hard lock).
    __________________
    DarthNinja is offline
    n-o-l-o
    Member
    Join Date: Sep 2004
    Location: Germany
    Old 05-26-2012 , 22:29   Re: [TF2] StopBotsFromPlayingEngineer
    Reply With Quote #6

    Hi!

    If you want to use

    Quote:
    Originally Posted by Extreme_One View Post
    sm_sbfpe_class "random"
    add the lines

    Code:
                if (StrEqual(alternateclass, "random", false))
                {
                    static const String:klassen[9][16] = {"scout","soldier","pyro","demoman","heavyweapons","engineer","medic","sniper","spy"};
                    alternateclass = klassen[GetRandomInt(0, 8)];
                }
    between


    Code:
                GetConVarString(sm_sbfpe_class, alternateclass, sizeof(alternateclass));
    and

    Code:
                FakeClientCommandEx(client, "joinclass %s", alternateclass);
    ---

    One thing. Such output can happen:

    Code:
    [StopBotsFromPlayingEngineer] Bot tried to go engineer, forcing engineer instead
    But I like it! One and another engi could not be wrong. :-) (Otherwise you can change "engineer" in the klassen string array to "medic" or whatever you like.)
    Attached Files
    File Type: sp Get Plugin or Get Source (less_engi_bots.sp - 349 views - 2.4 KB)

    Last edited by n-o-l-o; 05-26-2012 at 22:43.
    n-o-l-o is offline
    DreadedGhoul575
    Member
    Join Date: Apr 2016
    Location: Dudley, West Midlands
    Old 04-08-2016 , 18:20   Re: [TF2] StopBotsFromPlayingEngineer
    Reply With Quote #7

    This works, but the bots on the red team all turn into medic lol and some on blue as well. (Mainly because the first bot on red is always engineer)
    DreadedGhoul575 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 08:03.


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