Raised This Month: $33 Target: $400
 8% 

Team Ratio v0.0.6


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   General Purpose        Approver:   Arkshine (91)
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-28-2011 , 11:39   Team Ratio v0.0.6
Reply With Quote #1

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
Attached Files
File Type: sma Get Plugin or Get Source (team_ratio_final.sma - 2303 views - 11.1 KB)
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!

Last edited by Exolent[jNr]; 08-10-2011 at 10:23. Reason: Updated to v0.0.6
Exolent[jNr] is offline
Dolph_Ziggler
BANNED
Join Date: Jun 2011
Old 06-28-2011 , 11:56   Re: Team Ratio
Reply With Quote #2

very nice , but what is
Code:
mapchangecfgfile server.cfg
it is need to set it

(sorry bad eng -.-)
Dolph_Ziggler is offline
Send a message via MSN to Dolph_Ziggler
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-28-2011 , 12:16   Re: Team Ratio
Reply With Quote #3

Quote:
Originally Posted by Dolph_Ziggler View Post
very nice , 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.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Dolph_Ziggler
BANNED
Join Date: Jun 2011
Old 06-28-2011 , 12:20   Re: Team Ratio
Reply With Quote #4

okey
Dolph_Ziggler is offline
Send a message via MSN to Dolph_Ziggler
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 06-28-2011 , 12:23   Re: Team Ratio
Reply With Quote #5

Always wondered why you never tried to submit this.


Good Job
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-28-2011 , 12:24   Re: Team Ratio
Reply With Quote #6

Quote:
Originally Posted by nikhilgupta345 View Post
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.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 06-28-2011 , 12:31   Re: Team Ratio
Reply With Quote #7

Makes sense

Again, good job. A lot of people will find this plugin useful.
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-28-2011 , 12:37   Re: Team Ratio
Reply With Quote #8

Noticed a few bugs with the auto balance and they are now fixed.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
minimiller
Veteran Member
Join Date: Aug 2007
Location: United Kingdom
Old 06-28-2011 , 13:02   Re: Team Ratio
Reply With Quote #9

Nice plugin, but:
Quote:
Originally Posted by Exolent[jNr] View Post
- !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?
__________________
minimiller is offline
Send a message via MSN to minimiller
al3amri
Member
Join Date: May 2011
Old 06-28-2011 , 13:13   Re: Team Ratio
Reply With Quote #10

Nice Exolent Tested
i Love your Plugins So Much
__________________
YO !
al3amri 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 13:07.


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