gScramble, a Comprehensive Team Manager for TF2
not going to be supporting this for a while, best move it to unapproved
Requirements
- to enforce reconnect team blocking:
clientprefs, not required to run
- TF2 extension
Thanks
- Antithasys for all the help every time i bugged him when I didn't know what i was doing, letting me use his project site, and approving the plugin!
- MikeJS for help with team-score manipulation and Auto-Update
- Everyone for making suggestions and finding my dumb bugs so this could be such a useful script
Features 2.5.32(most features have a corresponding ConVar in cfg/sourcemod/plugin.gscramble.cfg)
Scramble-Modes- 6 Sort Modes
- 1 = Random
- 2 = Scoreboard Scores
- 3 = A ratio of score and connection time
- 4 = Player kill/death ratios
- 5 = Swap the top players on each team
- 6 = Randomly choose a sort mode so you can use all of them at the same time

- Make admins, medics, or engineers immune from scramble
- Respawn everyone after scramble depending on time and setting
- Restart round after scramble depending on time and setting
- Charge medic ubercannon if scramble occurs during setup
- Reset setup timer if scramble occurs during setup
Auto-Scramble
- scramble when one team is over-powered
- can trigger a vote instead of scrambling
Auto-Balance
- Balance valid players (admin, engineers, top scoring players, players helping their team (cp captures, flag touching, sentry destroying), and medics all can be made immune)
- Force balance after teams have been imbalanced too long
Force-Balance
- Admin can execute force-balance command
- Force-balance can happen between rounds
- Force-balance can happen if teams become too imbalanced
General
- Admin menu integration
- Force clients to accept their new team by blocking join team commands (detect reconnecting with clientprefs)
- RTV-style votescramble starting
- Admin commands for starting a scramble vote
- Allow clients to choose what team they'd prefer to be on (overrides auto-balance)
- Native bool gs_isBlocked(client) to see if the plugin is blocking someone from swapping teams
- (Experimental) Ask clients recently swapped if they want to rejoin their old team when someone reconnects and gets forced onto a team
- If enabled, block clients from changing to spectate if it will cause an imbalance
- If enabled, allow clients to choose a buddy to protect themselves from auto-balance and scramble.
- If enabled, block public voting when admins are present.
- *NEW If enabled, block clients from changing teams when mp_forceautoteam is enabled
Commands
Code:
sm_cancel admin Cancels any active scramble. Blocks auto-scramble check if run during bonusround
sm_forcebalance admin Forces a team balance if an imbalance exists.
sm_preference console Allows clients to choose what team they prefer
sm_resetvotes admin Resets all public votes.
sm_scramble admin sm_scramble <delay> <respawn> <mode>
sm_scrambleround admin Scrambles at the beginning of the next round
sm_scramblevote admin Start a vote. sm_scramblevote <now/end>
sm_addbuddy console add a buddy
Changes/Additions:
Code:
* denotes a late change/addition that didn't warrant a new version
2.5.32
- noticed that top player protection was not included in
the normal auto-balance immunity check
+ add flag carrier tracking and immunity from force-balance
- changed some default convar settings in the cfg
2.5.31
+ added covnar to disable auto-balance when there is less than a
certain amount of time remaining in a round.
- fixed auto-balance being active during arena maps with queue
enabled hopefully
2.5.3
- fixed the vote logging to show who voted against the vote when it
fails
- tried to add safeguards from potential overflow from force-balance..
didn't see any really, but still added safe-guards =\
- updated RU translation
- added check for the translation file, if it doesn't exist, the plugin goes
into fail-state
- *add PL translation
- *check for medigun in medic's slot 2 before attempting to set/read the charge-level. Just prevents errors from being logged when a mod changes
the weapon, or takes it away.
- * fixed auto-balance running during sudden death/ hopefully
2.5.2
+ add kill-death ratio sort mode
+ add top-players swap sort mode
+ add convar to control how many top players get swapped
- fixed rare instance where a player leaves one server while teamchange blocked and joins a different server, only to be forced to the team he was on while playing on the first server. This was due to a global clientprefs db.
- You should update your cfg files with this.
2.5.1
- fixed minor buggie with ES translation
- changed vote callback so votes with less than 50% can succeed if the menu convar is set less than 50%
- fix FOR SHAME message being spammed like INSANELY CRAZY
+ add convar to disable jointeam command and use the mp_forceautoteam convar
+ add convar to control the vote-scramble trigger
+ add convar and function to repeatedly advertise what the vote-scramble command is
+ add convar to disable the "Imabalance detected" and "FOR SHAME" messages
+ Translation phrases corresponding to the new functions BE SURE TO UPDATE THAT XD
2.5 -- wow didn't realize how fuxed up this plugin was... SORRY
- fix auto-balance on maps with no setup round
- fix admins disabling voting
- fix people being blocked from team changing after a scramble
- fix scramble switching less normal people for every immune person
+ added covnar to disable automatic admin menu integration
- updated to 1.3 command listener and askpluginload2 functions
- fixed blocking changes to spectator that would cause an imbalance
- fixed small bugs dealing with event hooks and entity properties
+ added fail-safes to make sure the plugin is running on TF2 and the TF2 extension is running
- forgot to re-add the line that prevents that auto-balance message from coming up when it's supposed to be disabled.
2.4.53
- fix auto-balance message coming up when auto-balance is disabled
- fix center text error message being logged
- updated French translation
2.4.52
- fix force-balance (again) D:<
2.4.51
- fix small bug with sequential auto-scramble checking
- updated ES translation
- fix typo in EN translation
2.4.5
- add convar to disable public voting when an admin is present.
- add simple buddy system that protects you and your buddy from auto-balance. disabled by default
- add feature to block people from changing to spectator if it will cause an imbalance. disabled by default. obeys the admin team-swap block convar and flags.
- re-do the scramble function to better deal with people immune from scramble.
- added a bunch to the translation. be sure to update that, or you will get errors.
2.4.02
- amended version since i believe any further changes will be minor
- add more options to the scramble now menu
- removed the restartround option for scramble now, since the command mp_restartround is bugged
2.4.2
- fix instances where force-balance timer wasn't getting started
- added more events to the teamwork protection section:
=> medic death *add when charged medic is killed
=> sapper placed *add when spy places sapper
=> charge deployed *add for medic and target when medic deploys uber
2.4.1
- fix it printing messages about balance when auto-balance is disabled
2.4
- !fix death message blocking for when an admin starts a long scramble delay
- !minor fixes and tweaks with autobalance checking:
=> changed way priority is gotten, should improve selection during force balance
- +convar to block auto-scramble when a scramble has happened recently
- be sure to update translation files and note the new convars in the cfg
Donations
This has taken a lot of time and effort, and I'd be proud to accept any forms of appreciation.
If your method is monetary, then click
here.
Translations THANKS!!
French Translation: Cadav0r --
COMPLETE
Danish Translation: OziOn --
NOT COMPLETE
Russian Translation: krolus --
COMPLETE
Spanish Translation: jack_wade --
COMPLETE
Hungarian Translation: KhyrOO--
NOT COMPLETE
German Translation: Guggie--
NOT COMPLETE
Italian Translation: Dagon--
NOT COMPLETE
Polish Translation: Mariano--
COMPLETE
INSTALL
unzip to tf dir
the plugin will auto-make the cfg if it's not there, but the one included is cleaner and organized better.