I worked on a few patches for this over the Summer and added a couple of ideas to it that were mentioned previously on the thread.
Changelog:
Code:
/* [TF2] Class Enforcer
* Plugin originally written by: linux_lover
*
* Changelog:
*
* 0.3.0 10/25/2015 - mywarthog:
* - The admin flag is no longer hardcoded.
* - Added override sm_ce_forceimmuned
* - Immunity defaults to the Slay Flag (f)
* - Added announcements (sm_ce_announce -1/0/1/2)
* - Added change forced class restarting (sm_ce_restart_type 0/1/2)
* - The plugin now works on bots.
* - Started a changelog
* - The config file is now automatically generated.
* - Announces the classes to the server at the start of a round, controlled by a new CVar: sm_ce_announce
* - Added a way to select a Round Restart type: CVar sm_ce_restart_type
* - Added FCVAR_DONTRECORD to the Plugin's Version CVar definition
* - Added a default class for both the sm_ce_blue and the sm_ce_red ConVars.
*
*/
I meant to release this back in August, but went through a bad experience with a **** that took me some time to recover from.
New CVars:
- sm_ce_announce (Default: 0) - Type of announcement to make on round start. -1 = Off, 0 = Chat, 1 = Center HUD, 2 = Hint Box.
- sm_ce_restart_type (Default: 0) - Restart round type. 0 = Disabled/Off, 1 = Restart the round, 2 = Respawn all Players.
New Overrides:
- sm_ce_forceimmuned *Defaults to the Slay (f) flag.*
New Config File Updates:
Delete the existing file before loading the newly updated plugin in order to replace it. Write down all settings.
- Added config file plugin.class_enforcer.cfg in the /tf/cfg/sourcemod folder.
Enjoy!