AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   TF2 Class limit (https://forums.alliedmods.net/showthread.php?t=62630)

Nican 11-13-2007 18:42

Re: TF2 Class limit
 
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

flubber 11-13-2007 20:17

Re: TF2 Class limit
 
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

LouLouBizou 11-14-2007 05:25

Re: TF2 Class limit
 
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 ?

Laser32 11-18-2007 06:22

Re: TF2 Class limit
 
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

Rothgar 11-18-2007 07:53

Re: TF2 Class limit
 
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.

tcviper 11-18-2007 09:26

Re: TF2 Class limit
 
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?

FlyingMongoose 11-18-2007 10:54

Re: TF2 Class limit
 
1 it's MaxClass.txt and it's under addons/sourcemod/configs ....also...this isn't on either of your tf2 servs!

t1mk1ll 11-18-2007 20:37

Re: TF2 Class limit
 
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)
}
}

flubber 11-18-2007 21:07

Re: TF2 Class limit
 
Quote:

Originally Posted by t1mk1ll (Post 554470)
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 :o. 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 :).

t1mk1ll 11-18-2007 21:13

Re: TF2 Class limit
 
Quote:

Originally Posted by flubber (Post 554475)
First, being one of the "creator" (at least i gave some idea thru the mapping process)of the map thanks for playing it :o. 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.:wink:


All times are GMT -4. The time now is 19:15.

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