Thread: TF2 Class limit
View Single Post
Fuzzwah
New Member
Join Date: Oct 2008
Old 10-10-2008 , 03:15   Re: TF2 Class limit
Reply With Quote #194

I've got the addon working as expected, but we run multiple servers out of a single directory and I'm attempting to only use restrictions on 1 server while the others play as normal.

I looked at the source and spotted the sm_maxclass_config option and I've set up the command lines of the server we want restrictions on to include: +sm_maxclass_config class21050.txt

Which I take it is pointing to the file:

C:\games\srcds\orangebox\tf\addons\sourcemod\ configs\class21050.txt

This file has the following in it:

Code:
"MaxClassPlayers"
{
    //Default config if the map tree is not found
    "default"
    {
            //When there is 1 to 32 players in the server
            "1-32"
            {
             //If the team is not set, it will be 1
            //Put -1 for no limit, 0 for disalowed, and any other number to set the limit
                "scout"        "-1"
                "sniper"    "-1"
                "soldier"    "3"
                "demoman"    "2"
                "medic"        "2"
                "heavyweapons"    "-1"
                "pyro"        "-1"
                "spy"        "-1"
                "engineer"    "-1"
        }
        //Anything that is not set, will be -1 (no limit)
    }
}
In the MaxClass.txt file I have all classes set to -1.

The issue I'm having is that the server I'm trying to run the restrictions on isn't picking up the new config file and is failing over to the default MaxClass.txt file. After the server had started I checked at the console and it appears that the cvar is set correctly:

sm_maxclass_config
"sm_maxclass_config" = "class21050.txt" ( def. "MaxClass.txt" )
- config file location

I renamed the MaxClass.txt file and can now see the following when the server fires up:

L 10/10/2008 - 18:04:20: [naris_MaxClass.smx] [MaxClass] Class manager is not running! Could not find file addons\sourcemod\configs\MaxClass.txt

Which clearly shows that its failing to pick up the custom config file and failing over to the defaul file name.

Any tips?

Last edited by Fuzzwah; 10-10-2008 at 03:19.
Fuzzwah is offline