AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Team Ratio v0.0.6 (https://forums.alliedmods.net/showthread.php?t=160613)

Exolent[jNr] 06-28-2011 11:39

Team Ratio v0.0.6
 
1 Attachment(s)
Team Ratio
Version 0.0.6
by Exolent



Description:
This plugin keeps the players on both teams sorted into a specific ratio.
For example, with this plugin you can set the server to have 1 Terrorist for every 3 Counter-Terrorists, making the CT's have 3x more players.

This is useful in specific gameplays where the teams need to be in an unbalanced manner so that the gameplay balances it out.
For example, if the Terrorists are super human with more HP, then they should have half the players of Counter-Terrorists to balance it out.


Cvars:
tr_enabled 0/1 (Default: 1)
- 0=Disables the plugin
- 1=Enables the plugin

tr_ratio <factor> (Default: 3)
- <factor> is the multiplier factor to determine the ratio.
- For a 3:1 ratio, the factor would be 3.

tr_advantage 1/2 (Default: 1)
- 1=Terrorist
- 2=Counter-Terrorist
- This is the team that has the ratio factor towards them.
- If you have ratio factor for 3:1 and this is 1, then the Terrorists will have 3x more players.

tr_autojoin 0/1/2 (Default: 1)
- 0=No auto join
- 1=Only auto join if chosen team will break ratio (can choose spectator if wanted)
- 2=Auto join to proper team to keep ratio (cannot choose spectator)
- If enabled, this will force players on a proper team when they join to keep the ratio balanced.
- This will also stop players from switching to another team if it will unbalance the ratio.

tr_autobalance 0/1/2/3 (Default: 0)
- 0=Disable auto balance
- 1=Enable auto balance, move excess players to opposite team
- 2=Enable auto balance, move excess players to spectator
- 3=Enable auto balance, kick excess players
- If enabled, this will balance the teams every round start to fit the ratio.

tr_autobalance_delay <delay[,delay[,...]]> (Default: 1.0,5.0)
- If autobalance is enabled, this is the delay(s) after round starts to auto balance
- Separate multiple values by a comma

tr_autobalance_choose 0/1 (Default: 0)
- This is how the plugin chooses which players to move/kick for auto balancing.
- 0=Choose the last players in the players list (not guaranteed to be last connected players)
- 1=Choose random players from the players list

tr_immunity 0/1 (Default: 1)
- 0=Treat all players the same
- 1=Immune admins aren't affected
- If enabled, immune admins are not forced to a team when they join, nor to a new team when they switch teams.
- Immune admins are also last of the players to be switched when the teams are being balanced (yes, immune admins are switched if no other non-admins are available).

tr_immunity_flag <flag> (Default: "a")
- The admin flag that gives immunity in this plugin


Requirements:
- AMX Mod X 1.8.0 or higher


Changelog:
Version 0.0.6
- Added tr_autobalance_choose cvar
- Removed unused define and the commented debug log

Version 0.0.5
- Added tr_autobalance_delay cvar
- Fixed auto balancing

Version 0.0.4
- Fixed ratio calculation for auto balance
- Optimized sorting immunity players for auto balance
- Added value 2 for tr_autojoin
- Added values 2,3 for tr_autobalance

Version 0.0.3
- Fixed bug for choosing option 5 for team (auto select)
- Optimized sorting immunity players for auto balance

Version 0.0.2
- Added immunity for admins
- Fixed small bug for auto balance

Version 0.0.1
- Initial release

Dolph_Ziggler 06-28-2011 11:56

Re: Team Ratio
 
very nice :D, but what is
Code:

mapchangecfgfile server.cfg
it is need to set it

(sorry bad eng -.-)

Exolent[jNr] 06-28-2011 12:16

Re: Team Ratio
 
Quote:

Originally Posted by Dolph_Ziggler (Post 1498818)
very nice :D, but what is
Code:

mapchangecfgfile server.cfg
it is need to set it

(sorry bad eng -.-)

It sets that the server.cfg will be executed each map change.

Dolph_Ziggler 06-28-2011 12:20

Re: Team Ratio
 
okey :D

nikhilgupta345 06-28-2011 12:23

Re: Team Ratio
 
Always wondered why you never tried to submit this.


Good Job :)

Exolent[jNr] 06-28-2011 12:24

Re: Team Ratio
 
Quote:

Originally Posted by nikhilgupta345 (Post 1498847)
Always wondered why you never tried to submit this.

I was never satisfied with any version I had put out there until I wrote this one.

nikhilgupta345 06-28-2011 12:31

Re: Team Ratio
 
Makes sense :)

Again, good job. A lot of people will find this plugin useful.

Exolent[jNr] 06-28-2011 12:37

Re: Team Ratio
 
Noticed a few bugs with the auto balance and they are now fixed.

minimiller 06-28-2011 13:02

Re: Team Ratio
 
Nice plugin, but:
Quote:

Originally Posted by Exolent[jNr] (Post 1498804)
- !IMPORTANT! If this value is not 1 or 2, there will be problems with the plugin!

Is there any reason you havent coded in a check for this?

al3amri 06-28-2011 13:13

Re: Team Ratio
 
Nice Exolent Tested
i Love your Plugins So Much


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

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