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

TF2 Class limit


Post New Thread Reply   
 
Thread Tools Display Modes
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 11-13-2007 , 18:42   Re: TF2 Class limit
Reply With Quote #21

And that is exactly the problem I am trying to fight

I have been looking up/down the source mod engine on how to do that, and I was only able to block the function

I tried executing the command to open the menu again, but nothing happens

The only option left would be to hack the computer memory and call the function manually, but I am not good at doing that kind of stuff
__________________
http://www.nican132.com
I require reputation!
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
flubber
Senior Member
Join Date: Oct 2007
Old 11-13-2007 , 20:17   Re: TF2 Class limit
Reply With Quote #22

It works like a charms, I restrict on one map on our server (ctf_rugby) feel free to join us to verify that the plugin works : 217.70.184.250:27016
flubber is offline
LouLouBizou
Member
Join Date: Aug 2006
Location: Toulouse (France)
Old 11-14-2007 , 05:25   Re: TF2 Class limit
Reply With Quote #23

Maybe one thing that can help you ! if my memorie is correct, in plugin BAT by EKS, when you try to swap a player to another team (like red -> blue), player dont be swaped and come in class menu ! mabe have a look at the source code of BAT.

No ?
__________________
LouLouBizou alias Don French !


LouLouBizou is offline
Send a message via MSN to LouLouBizou
Laser32
AlliedModders Donor
Join Date: Sep 2006
Location: Germany (Schwerin)
Old 11-18-2007 , 06:22   Re: TF2 Class limit
Reply With Quote #24

Hi all.

sorry for my Englisch.

this script dont work on my Server. 24 Slot , 2fort only

installed sourcmod 1.7...

Put MaxClass.smx into tf\addons\sourcemod\plugins
Put MaxClass.txt into tf\addons\sourcemod\configs

This is my MaxClass.txt

"MaxClassPlayers"
{
//Put the map name as the name for specif-map config
"ctf_2fort"
{
//When there is 1 to 5 players in the server
"1-24"
{
//Put -1 for no limit, 0 for disalowed, and any other number to set the limit
"scout" "-1"
"sniper" "2"
"soldier" "-1"
"demoman" "1"
"medic" "-1"
"heavy" "1"
"pyro" "1"
"spy" "1"
"engineer" "2"
}

//When there is 6 players in the server
}
}


pls help me
Laser32 is offline
Rothgar
Veteran Member
Join Date: Nov 2007
Old 11-18-2007 , 07:53   Re: TF2 Class limit
Reply With Quote #25

Hi Nican,

Nice plugin, will definitely be interested in this script to hopefully decrease snipers mainly and possibly limit heavy's.

Couple of ideas, rename the smx and sp file to tf2_maxclass or similar in case another mod is looking for a maxclass plugin?

Make the config file easier to use, maybe have a default section and then use 1-6 for example?

I thought the default config file meant 6 and over would have a limit however after printing the results to console I saw that it was indeed not the case and it was only trying to limit when there were only 6 people in the server...

having the flexibility to define classes on player count is useful in some situations however I think it needs an easier method to define a default section and then the rest over-ride, that way you could even shorten map specific blocks or player range blocks to only change a few classes and use the rest from default rather than specifying them all in every block.

Hopefully this makes sense to you since you said English is not your primary language, if you need clarification let me know.

Great plugin I'll be checking it out soon once I make the amendments.

Example:

Code:
 "MaxClassPlayers"
{
    //Default config if the map tree is not found
    //Put -1 for no limit, 0 for disallowed, and any other number to set the limit

  "default"
  {
    "default"
    {
            "scout"        "-1"
            "sniper"    "-1"
            "soldier"    "-1"
            "demoman"    "-1"
            "medic"        "-1"
            "heavy"        "-1"
            "pyro"        "5"
            "spy"        "-1"
            "engineer"    "6"
    }
    "1-5"
    {
            "heavy"        "1"
    }

    "6-24"
    {
            "sniper"    "2"
    }
  }

  "ctf_2fort"
  {
    "default"
    {
            "pyro"        "0"
    }

    "6-24"
    {
            "engineer"    "3"
    }
  }
}
So in the example:
The default > default block takes effect on all maps and sets the base defaults.
The default > players blocks take affect on all maps and over-rides the defaults.
The map > default block over-rides the defaults outlined in both "default > default" and "default > players blocks".
The map > player block over-rides all other blocks.

Once again hope this makes sense, I am not sure if it's currently setup like this or not already.

Last edited by Rothgar; 11-18-2007 at 07:56.
Rothgar is offline
Send a message via ICQ to Rothgar Send a message via AIM to Rothgar Send a message via MSN to Rothgar
tcviper
Veteran Member
Join Date: Oct 2005
Location: Netherlands
Old 11-18-2007 , 09:26   Re: TF2 Class limit
Reply With Quote #26

This doesnt work at all for me? I see 5 engineers while its set to 2 and I keep seeing over 5 heavy's while its set to 1. The plugin is loaded and the MaxConfigs file is set. Any idea?
__________________
tcviper is offline
Send a message via MSN to tcviper
FlyingMongoose
Veteran Member
Join Date: Mar 2004
Old 11-18-2007 , 10:54   Re: TF2 Class limit
Reply With Quote #27

1 it's MaxClass.txt and it's under addons/sourcemod/configs ....also...this isn't on either of your tf2 servs!
__________________
Please do NOT PM for support.

Only ask for support in plugin threads.

TunedChaos.com - Precision Tuned Game Servers
FlyingMongoose is offline
t1mk1ll
New Member
Join Date: Nov 2007
Old 11-18-2007 , 20:37   Re: TF2 Class limit
Reply With Quote #28

I have tried to get this running for ctf_rugby to limit snipers and it just will not take.

Quote:
"MaxClassPlayers"
{
//Default config if the map tree is not found
"default"
{
//When there is 1 to 5 players in the server
"1-5"
{
//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"
"heavy" "-1"
"pyro" "-1"
"spy" "-1"
"engineer" "-1"
}

//When there is 6 players in the server
"6"
{
//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"
"heavy" "-1"
"pyro" "-1"
"spy" "-1"
"engineer" "-1"
}
//Anything that is not set, will be -1 (no limit)
}
//Put the map name as the name for specif-map config
"ctf_rugby"
{
//When there is 1 to 5 players in the server
"1-5"
{
//Put -1 for no limit, 0 for disalowed, and any other number to set the limit
"scout" "-1"
"sniper" "2"
"soldier" "-1"
"demoman" "-1"
"medic" "-1"
"heavy" "-1"
"pyro" "-1"
"spy" "-1"
"engineer" "-1"
}

//When there is 6 players in the server
"6"
{
//Put -1 for no limit, 0 for disalowed, and any other number to set the limit
"scout" "-1"
"sniper" "2"
"soldier" "-1"
"demoman" "-1"
"medic" "-1"
"heavy" "-1"
"pyro" "-1"
"spy" "-1"
"engineer" "-1"
}
//Anything that is not set, will be -1 (no limit)
}
}

Last edited by t1mk1ll; 11-18-2007 at 20:41.
t1mk1ll is offline
flubber
Senior Member
Join Date: Oct 2007
Old 11-18-2007 , 21:07   Re: TF2 Class limit
Reply With Quote #29

Quote:
Originally Posted by t1mk1ll View Post
I have tried to get this running for ctf_rugby to limit snipers and it just will not take.
First, being one of the "creator" (at least i gave some idea thru the mapping process)of the map thanks for playing it . We have rugby on our server, and TF2 Class works. You just have to add what i put in red :

Code:
 //When there is 6 players or more in the server
        "6-24"
        {
            //Put -1 for no limit, 0 for disalowed, and any other number to set the limit
            "scout"        "-1"
            "sniper"    "2"
            "soldier"    "-1"
            "demoman"    "-1"
            "medic"        "-1"
            "heavy"        "-1"
            "pyro"        "-1"
            "spy"        "-1"
            "engineer"    "-1"
        }
May i suggest a scout limit too .
flubber is offline
t1mk1ll
New Member
Join Date: Nov 2007
Old 11-18-2007 , 21:13   Re: TF2 Class limit
Reply With Quote #30

Quote:
Originally Posted by flubber View Post
First, being one of the "creator" (at least i gave some idea thru the mapping process)of the map thanks for playing it . We have rugby on our server, and TF2 Class works. You just have to add what i put in red :

Code:
 //When there is 6 players or more in the server
        "6-24"
        {
            //Put -1 for no limit, 0 for disalowed, and any other number to set the limit
            "scout"        "-1"
            "sniper"    "2"
            "soldier"    "-1"
            "demoman"    "-1"
            "medic"        "-1"
            "heavy"        "-1"
            "pyro"        "-1"
            "spy"        "-1"
            "engineer"    "-1"
        }
May i suggest a scout limit too .
nice thanks. no one has complainied about scouts...yet.
t1mk1ll 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 10:07.


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