AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CS:S] Jailbreak Team Balance (https://forums.alliedmods.net/showthread.php?t=149632)

databomb 02-09-2011 14:41

[CS:S] Jailbreak Team Balance
 
2 Attachment(s)
CSS Jailbreak Team Balance
[email protected]
Original Compile Date: 12.26.2010

Description/Features:

This plugin is designed to automate the team switching that inundate many admins in the CSS Jailbreak community. A configurable ratio will specify how many Ts for each CT. The ratio is matched every time the round ends. While the ratio is usually higher or lower than what is requested, the plugin will find the closest match possible at the end of every round. One advantage of this plugin is the separate algorithms for T and CT switching. When a player is switched off CT team a LIFO routine (last person to join is moved off first) is specified while (optionally) only those with a mic are randomly switched to CT absent any guard requests which are pending.

Prisoners may type '!guard' in chat or use the sm_guard command to join a queue of those requesting a transfer to CT. The queue is processed in normal FIFO fashion (the first to join the queue is the first to get a transfer.) Admins may say '!clearguards' or use the sm_clearguards command to manually clear the guard queue completely. Admins may also target a single unwanted individual with '!removeguard <player|#userid>' or just sm_removeguard which will bring up the removal menu. While anyone is waiting in the queue for a CT position, team switching to CT is blocked and instead handled by the queue.

When you join the server and haven't yet selected a team, you're required by default to pick either Terrorist team or Spectate. Auto-join is disabled. Often times the teams will become stacked at the beginning of a map resulting in the often mandated 'first-round free-day.' This behavior is compensated for by allowing the first person access to the CT team without any of the previous restrictions but enforcing it thereafter. Also, teams are locked during round transitions to make it impossible for players to switch back to CT without suiciding after they spawn in the following round. The exception to this is at the beginning of the game when you hear "Round Draw" it will still allow you to join teams.

Optional Plugins:

If you have asherkin's VoiceHook installed then this plugin will determine which Ts used their mics each round and exclude those that did not use their mic from being switched to CT. This has built in integration with a few other plugins such as Azelphur's and my own team bans plugin in addition to my voicecomm plugin for dead all talk.

Usage/Cvar List:
sm_jbtb_ratio, [0.1-10.0]: Sets the ratio of Ts to CTs (e.g. 3.0 will match 12Ts & 4CTs with 16 players.)
sm_jbtb, [0,1]: Turns the plugin functionality on or off.
sm_jbtb_soundfile, <path>: The path to the soundfile to play when denying a team-change request. Set to "" to disable.
sm_jbtb_showqueue, [0,1]: Sets whether the position in the queue is revealed to players when they use the guard command.
sm_jbtb_showclasses, [0,1]: Sets whether to show the classes screen after the team selection screen. Useful for servers that use custom models or model menus.
sm_jbtb_blockct, [0,1]: This requires everyone to play as T before joining CT. This may frusturate potential free-killers and/or your regulars.

Installation:
Place the JailbreakTeamBalance.smx file in addons/sourcemod/plugins/
Place the jailbreak-tb.phrases.txt file in addons/sourcemod/translations/

Future Considerations:
- Overhaul the team size matching algorithm and T->CT selection for efficiency
- Additional integrations with VoiceHook such as informational notifications
- Optimize code further

Special Thanks:
- psychonic who helped me with many general SM issues
- dalto who wrote the deny sound code which I've used in this plugin
- asherkin who has developed the VoiceHook MetaMod:Source plugin
- Donkey Kong who has helped to re-add CS:GO support to the plugin

Change log:
3.0.7.2 Float math bug fix (Donkey Kong, r=me)
3.0.7.1 Minor bug fix
3.0.7 Added protocol buffer support to UTIL_TeamMenu()
3.0.6 Added protocol buffer support for CS:GO
3.0.5 Added fix for dead players waiting for the round start.
3.0.4 Numerous bug fixes. Major bug fix causing potential crashes on servers running Team Bans in tandem with JBTB.
3.0.0 Major Update: Added VoiceHook integration, RemoveGuard Command, Hide Classes Menu, Re-Display Teams Menu; Updated Translations; Patched Bug on Map Start; Numerous Code Optimizations
2.80 Translation integration; Patched potential security problem; Fixed 'Unknown Command' when sm_guard is used; New cvar for showing position in queue; other small bug/code fixes
2.70 Forces 'mp_limitteams' to 0. Added integration with Azelphur's Team Ban plugin.
2.64 Fixed issue where those without voicecomm or CT bans could not use plugin, Added better integration with voicecomm for late-joiners.
2.60 Initial public release

meng 02-09-2011 20:29

Re: [CS:S] Jailbreak Team Balance
 
+1 woot. Thank you very very much. I am always too drunk, lazy, stoned or tired to deal with this nonsense. Will try it out when I finally get a JB server running.

higs 02-11-2011 10:24

Re: [CS:S] Jailbreak Team Balance
 
Any1 tried this?

namine 02-12-2011 11:36

Re: [CS:S] Jailbreak Team Balance
 
It is not working... I get this in console whenever I type !guard:
Unknown command: sm_guard

databomb 02-12-2011 12:08

Re: [CS:S] Jailbreak Team Balance
 
Quote:

Originally Posted by namine
It is not working... I get this in console whenever I type !guard:
Unknown command: sm_guard

Did you wait for the map to change so it loads the plugin? If so, check 'sm plugins list' to make sure it has loaded correctly. Also check if the plugin created the configuration file in cstrike/cfg/sourcemod/jailbreak-teambalance.cfg

Many people on my server try !GUARD or !gaurd which will not work.

databomb 02-12-2011 14:53

Re: [CS:S] Jailbreak Team Balance
 
Version 2.64 released.

Fixed issue where those without voicecomm or CT bans could not use plugin.
-- I added extra checks to make sure we weren't operating on invalid handles. This should fix any compatibility issues between myself and those without the voicecomm and/or CT bans plugin.

Added better integration with voicecomm for late-joiners.
-- Late-joiners to Terrorist team can now hear CTs without the need to wait a round. (this is for integration with the voicecomm plugin)

faded 02-20-2011 13:13

Re: [CS:S] Jailbreak Team Balance
 
Databomb we are having issues this the public.. our Ratio was set to 2.75 default so we changed to 3.

When there were 3 Terr and 1 CT, the next person to join couldnt join because, They were too many "Terrorists". If he would select CT, it would state, You must play as T before joining CT..

Seems like a lot of cordination of making someone moving to CT first before someone would join.. :(

Any way to fix this?

databomb 02-20-2011 13:41

Re: [CS:S] Jailbreak Team Balance
 
Quote:

Originally Posted by faded (Post 1419803)
Databomb we are having issues this the public.. our Ratio was set to 2.75 default so we changed to 3.

When there were 3 Terr and 1 CT, the next person to join couldnt join because, They were too many "Terrorists". If he would select CT, it would state, You must play as T before joining CT..

Seems like a lot of cordination of making someone moving to CT first before someone would join.. :(

Any way to fix this?

faded, I'll add this to the original post, but for all JB servers you need to add the following to your server.cfg to make any sort of ratio work:

mp_limitteams 0

the default value is 2 so it will only allow 2 more people on Ts than on CT, which is exactly the situation you've described.

amohanlall32 02-21-2011 17:27

Re: [CS:S] Jailbreak Team Balance
 
My server has a little problem with this plugin.

I am running the TeamBan by Azelphur and this.

My admins are telling me they had to do a lot of switching because of this plugin switching a lot of people without mics or freekillers to CT. Even after TeamBanning them, the Balance plugin still switches them back to CT.

Does this plugin have a built in TeamBan that is conflicting with the TeamBan by Azelphur or am I doing something wrong?

databomb 02-21-2011 18:25

Re: [CS:S] Jailbreak Team Balance
 
Quote:

Originally Posted by amohanlall32 (Post 1420416)
My server has a little problem with this plugin.

I am running the TeamBan by Azelphur and this.

My admins are telling me they had to do a lot of switching because of this plugin switching a lot of people without mics or freekillers to CT. Even after TeamBanning them, the Balance plugin still switches them back to CT.

Does this plugin have a built in TeamBan that is conflicting with the TeamBan by Azelphur or am I doing something wrong?

amohanall32, you're not doing anything wrong. I integrated this with my own CT bans plugin which has not been released yet. Since Azelphur released his first I'm questioning whether to release mine. However, what I could do is write some code to integrate this with Azelphur's plugin, it's just a matter of looking at the correct cookies. I'm having some hardware problems right now but I should hopefully post something back here tomorrow.


All times are GMT -4. The time now is 05:44.

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