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

TF2 Class limit


Post New Thread Reply   
 
Thread Tools Display Modes
zerosilence
New Member
Join Date: Oct 2008
Old 10-01-2008 , 12:23   Re: TF2 Class limit
Reply With Quote #191

I'm a noob fo sho how do i make it so that instead of it being "6" people for 6 people on the server to make it 6 to 20 people?

"6-20" ?
zerosilence is offline
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 10-01-2008 , 12:25   Re: TF2 Class limit
Reply With Quote #192

I don't really understand your question, but I think the answer is yes.

If you want to limit from 6 to 20 players, you do "6-20"
__________________
http://www.nican132.com
I require reputation!
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
zerosilence
New Member
Join Date: Oct 2008
Old 10-01-2008 , 12:29   Re: TF2 Class limit
Reply With Quote #193

yep me to.
zerosilence is offline
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
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 10-14-2008 , 16:02   Re: TF2 Class limit
Reply With Quote #195

Hello. Sorry for delayed answer.

Try typing "sm_classlimit" in your console and see if you get a bunch of -1.

I think I know what is the problem.
__________________
http://www.nican132.com
I require reputation!
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
Fuzzwah
New Member
Join Date: Oct 2008
Old 10-16-2008 , 02:42   Re: TF2 Class limit
Reply With Quote #196

With my MaxClass.txt file still renamed:

L 10/16/2008 - 1777: [naris_MaxClass.smx] [MaxClass] Class manager is not running! Could not find file addons\sourcemod\configs\MaxClass.txt
Fuzzwah is offline
TheNuke
New Member
Join Date: Nov 2008
Old 11-02-2008 , 08:17   Re: TF2 Class limit
Reply With Quote #197

Hi,
just wanted to point a really annoying bug - sometimes (not sure under what conditions), some ppl are able to take classes against the maxclass restrictions, it usually happens in a populated server and whoever dies first gets his class switched.

anyone knows a solution for that?

Thanks for the pluging, im really enjoying it

Tal
TheNuke is offline
TheNuke
New Member
Join Date: Nov 2008
Old 11-02-2008 , 08:30   Re: TF2 Class limit
Reply With Quote #198

sorry for double posting... forum crashed on me.

Last edited by TheNuke; 11-02-2008 at 09:24.
TheNuke is offline
demm
Junior Member
Join Date: Feb 2008
Old 12-19-2008 , 14:05   Re: TF2 Class limit
Reply With Quote #199

Replace line 281
Code:
    BuildPath(Path_SM, file, sizeof(file),"configs/%s", ConfigFileName);
with
Code:
    BuildPath(Path_SM, file, sizeof(file),"configs/%s", config);
to fix a critical bug that prevents you from using any other config file than the default MaxClass.txt.
demm is offline
CommanderX
New Member
Join Date: Jan 2009
Old 01-11-2009 , 09:48   Re: TF2 Class limit
Reply With Quote #200

Hey i've put the MaxClass.txt and i'm having some problems there is no error message it just doesn't restrict the classes

here is the code i put into the server.cfg

sm_maxclass_allow 1
sm_maxclass_exclude_admins 0
sm_maxclass_count_admins 0
sm_maxclass_config MaxClass.txt

And here is the code thats in the MaxClass.txt

"MaxClassPlayers"
{
//Default config if the map tree is not found
"default"
{
//When there is 1 to 7 players in the server
"1-7"
{
//Team2 = red AND team3 = blue
//set to 0 if you want this to only work on one team
"red" "1"
"blue" "1"

//Put -1 for no limit, 0 for disalowed, and any other number to set the limit
"scout" "1"
"sniper" "1"
"soldier" "1"
"demoman" "1"
"medic" "1"
"heavyweapons" "1"
"pyro" "1"
"spy" "1"
"engineer" "1"
}

//When there is 8 to 16 players in the server
"8-16"
{
//Team2 = red AND team3 = blue
//set to 0 if you want this to only work on one team
"red" "1"
"blue" "1"

//Put -1 for no limit, 0 for disalowed, and any other number to set the limit
"scout" "2"
"sniper" "2"
"soldier" "2"
"demoman" "2"
"medic" "2"
"heavyweapons" "2"
"pyro" "2"
"spy" "2"
"engineer" "2"
}

//When there is 17 to 24 players in the server
"17-24"
{
//Team2 = red AND team3 = blue
//set to 0 if you want this to only work on one team
"red" "1"
"blue" "1"

//Put -1 for no limit, 0 for disalowed, and any other number to set the limit
"scout" "3"
"sniper" "2"
"soldier" "3"
"demoman" "2"
"medic" "3"
"heavyweapons" "2"
"pyro" "2"
"spy" "2"
"engineer" "3"
}

//Anything that is not set, will be -1 (no limit)
}

Any help would be appreciated cos i've asked a few people and they seem to think it all looks right but it still isn't working
CommanderX 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 05:13.


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