My map, Hunter Training, has seen enormous success on L4D, and nearly as much success on L4D2. On L4D2, however, playing HTM on a dedicated server has not been possible, because HTM needs certain cheats enabled to play, and L4D2 dedicated servers have cheats locked off.
This plugin fixes that problem, by removing the cheat flag from the cvars HTM needs, making it possible to use them without needing sv_cheats 1.
You do not need
this plugin to play multiplayer on L4D dedicated servers, however, I recommend getting it anyway, as it will make your server much
less able to be highjacked, as it will not enable all cheats, but merely those listed below.
Admins can automatically turn this plugin on and change the settings to those of the Live Fire Course on any map with "htm_training_start". "htm_training_start" will also change the game mode to versus even on a L4D2 server and will cause survivors to automatically teleport back to the beginning of the map when they enter the end safe room.
god - needed to keep hunters from killing the survivors, who have no way to heal in the map
noclip - needed to pull hunters off the Survivors on the pounce Challenges (works as it does with sv_cheats on)
nb_stop - needed to keep the survivors from moving around and shooting during the Challenge courses
vs_max_team_switches - not really needed, but it helps to be able to switch between the two teams
sb_all_bot_team / sb_all_bot_game - needed to keep the game from quitting when there are no humans on the survivor team
z_spawn - needed for the hunter auto-spawn system (z_spawn can not be used to spawn tanks or witches with the plugin)
director_no_death_check - needed for the Live Fire Course to keep the game from ending if all the survivors somehow manage to die
z_hunter_health - needed for the Live Fire Course to give the hunter 6000 health
give - needed for the Live Fire Course to keep the hunter at 6000 health (can only be used to give health)
(The two cvars above make the hunter impossible to kill except from a headshot or the kill command.)
kill - useful on Live Fire Course when a player is made to be the tank
warp_far_survivor_here - useful to practice pouncing a particular spot.
respawn - respawns yourself if you are a dead survivor, takes you to beginning of map. (requires gamedata file)
respawn_all - respawns all survivors at the beginning of the map. (requires gamedata file)
(Credit goes to AtomicStryker and doku for the respawn code.)
How it works:
l4d2_htm_mp_enabler - the plugin version
l4d2_htm_mp_enable - toggles cheats
htm_training_start - manually start training
With l4d2_htm_mp_enable set to 1, the above listed cvars are modified to allow changing/using them without needing sv_cheats 1 and sv_cheats will be set to 0 if it isn't already. Set to 0 resets those cvars to again need sv_cheats 1.
HTM v.3.1 and above will automatically set l4d2_htm_mp_enable to 1 at startup- whether you start on the Challenge run or the Live Fire Course.
Place this plugin in your sourcemod plugins folder.
Place the "htm_mp_enabler.gamedata.txt" file in the gamedata folder. (Only needed for respawn functionality. (This includes the auto-teleport to start.))
By doing this, whenever HTM is loaded, the cheats it needs will be enabled, and whenever any other map is loaded, the plugin will disable them, preventing abuse that could happen otherwise.
1.0 - Initial version
1.1 - Removed all unnecessary variables.
1.2 - Add hook for noclip to make it actually work - merely removing its cheat flag wasn't enough.
1.3 - Added "kill" to the cheat enable list, restricted "give" to "give health", restricted "z_spawn" to exclude tanks and witches, made enabled noclip function like normal, fixed minor bug that causes servers to bork on map change.
1.3.1 - Added check to restriction on give and z_spawn to only restrict when "l4d2_htm_mp_enable" = 1.
2.0 - Added manual start of Live Fire Course settings to admins for any map and removed need to manually reset anything on map change.
2.5 - Add "respawn", "respawn_all", updated "htm_training_start" to also change game mode to versus and teleport bots back to start when they get to the end of the map. Requires "htm_mp_enabler.gamedata.txt" to be in gamedata folder for respawning to function.
2.5.1 - Minor fix to problem caused by "The Sacrifice" DLC for L4D2.