AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   "CTs/Terrorists Full" message (https://forums.alliedmods.net/showthread.php?t=26632)

capndurk 04-06-2006 00:25

"CTs/Terrorists Full" message
 
To my knowledge, there is no cvar that sets the value for the max amount of people on one team..... or is there? Or is it set by the max number of slots / 2?


//edit// put in the "scripting help" forum because it's needed for my current plugin

organizedKaoS 04-06-2006 03:03

Are you trying to have the teams stacked to only so many per team?
If so, use mp_autoteambalance 0 to make sure no one is auto transferred.
mp_limitteams 0 so that you can stack each team to whatever limit you want.
Do a check, say every round end, on each team. If ct/t has too many players ( more than what you want the max to be ) then have the plugin transfer how many is needed.

VEN 04-06-2006 04:55

AFAIK, there is no such CVAR.
While there are a limit for the amount of players per team.
It depends on the number of map's spawn points.
While it's possible to override that limitation with cs_set_user_team.

capndurk 04-06-2006 13:25

VEN, do you think I'd need to include this in my plugin? It seems a bit overkill, but I thought that there might be that one case where the teams are balanced and mp_limitteams is 2 but the T team is full or whatever... ah whatever, if there's no way to determine the max allotted to each team then there's no point in worrying about it.

organizedKaoS 04-06-2006 14:48

Like I said, use mp_autoteambalance 0 and mp_limitteams 0 and you can have the plugin determine the max amount per team. Use what VEN suggested, cs_set_user_team. I know for a fact that wont kill the player and if you do a team check every round end then you can control the amount of players per team.

capndurk 04-06-2006 17:17

Quote:

Originally Posted by organizedKaoS
Like I said, use mp_autoteambalance 0 and mp_limitteams 0 and you can have the plugin determine the max amount per team. Use what VEN suggested, cs_set_user_team. I know for a fact that wont kill the player and if you do a team check every round end then you can control the amount of players per team.

No, I can't use cs_set_user_team with my plugin, and mp_autoteambalance doesn't deal with the max number of players for a team. I'm already using mp_limitteams, but I don't change the value in my plugin, I use it. Thanks anyway.

VEN 04-07-2006 05:59

Quote:

While it's possible to override that limitation with cs_set_user_team.
It's possible but not recommended since number of spawn points is limited. Using that way may lead to some unexpected results like sawning two players at one spawn point, autoslaying some players.

As for team player limit, you can determine it by counting spawn points.
Code:
new ent, max_ts, max_cts while ((ent = find_ent_by_class(ent, "info_player_deathmatch"))) max_ts++ while ((ent = find_ent_by_class(ent, "info_player_start"))) max_cts++

Probably you can even create/remove such entities which will change such limits accordingly and will solve the problems listed above.

Simon Logic 11-21-2006 07:42

Re: "CTs/Terrorists Full" message
 
I wrote a script which changes classname of half of T-team spawn points (info_player_deathmatch) in plugin_cfg() event (for original deathamatch map). But CS eventually store the information on map loading and does not allow more than one CT to join a game. Can you help me to force the engine to refresh its CT/T spawn point count value?

VEN 11-21-2006 10:34

Re: "CTs/Terrorists Full" message
 
You can fully control spawn points only on map start in plugin_precache/KeyValue/Spawn forwards.

Simon Logic 11-21-2006 10:40

Re: "CTs/Terrorists Full" message
 
Quote:

Originally Posted by VEN (Post 405614)
You can fully control spawn points only on map start in plugin_precache/KeyValue/Spawn forwards.

Great idea! But how did you knew that? =) There is no source code for CS.

PS. Exclusively for VEN. Is there a good Russian forum dedicated to amx x scripting to discuss problems in native language?


All times are GMT -4. The time now is 16:41.

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