View Single Post
Author Message
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 07-02-2012 , 08:05   [L4D2] Survivor Bot Holdout (1.9) [29-Apr-2022]
Reply With Quote #1




About:
  • Create Bill, Francis, Louis, Zoey, Nick, Rochelle, Coach and Ellis to holdout their surrounding area.
  • Bots are frozen and throw items just as they do on "c6m3_port".
  • The config which stores the bots spawn location data is saved to \sourcemod\data\l4d2_holdout.cfg.
  • A file called l4d2_holdout.nut is saved to your servers \left4dead2\left4dead2\scripts\vscripts\ folder and is required to function. - Old version.


Known Bugs:
  • No control over which items are thrown.
  • Cannot use this plugin on "c6m1_riverbank" or "c6m3_port" maps.


Thanks:
  • Don't Fear The Reaper
  • disawar1
  • Herbie
  • Zbeer
  • DrDarkTempler


Admin Commands: (requires "z" flag)

PHP Code:
sm_holdout        // Saves to the config for auto spawning or Deletes if already saved. Usage: sm_holdout <1=Francis, 2=Louis, 3=Zoey, 4=Bill, 5=Nick, 6=Rochelle, 7=Coach, 8=Ellis> [weapon name, eg: rifle_ak47 or 0 for random weapon].
sm_holdout_temp   // Spawn a temporary survivor (not saved). Usage: sm_holdout_temp <1=Francis, 2=Louis, 3=Zoey, 4=Bill, 5=Nick, 6=Rochelle, 7=Coach, 8=Ellis> [weapon name, eg: rifle_ak47 or 0 for random weapon].
sm_holdout_give   // Makes one of the survivors give an item. 

CVars:

Saved to l4d2_holdout.cfg in your servers \cfg\sourcemod\ folder.

PHP Code:
// 0=Plugin off, 1=Plugin on.
l4d2_holdout_allow "1"

// 0=Allow bots to move and take items. 1=Prevent bots from moving (old method).
l4d2_holdout_freeze "1"

// 0=No. 1=Give the survivors laser sights.
l4d2_holdout_lasers "1"

// 0=No. The chance out of 100 for Louis to get a minigun.
l4d2_holdout_minigun "75"

// Turn on the plugin in these game modes, separate by commas (no spaces). (Empty = all).
l4d2_holdout_modes ""

// Turn off the plugin in these game modes, separate by commas (no spaces). (Empty = none).
l4d2_holdout_modes_off ""

// Turn on the plugin in these game modes. 0=All, 1=Coop, 2=Survival, 4=Versus, 8=Scavenge. Add numbers together.
l4d2_holdout_modes_tog "0"

// 0=Off, 1=Spawn an ammo pile next to a survivor when spawning them.
l4d2_holdout_pile "1"

// 0=Off, -1=Infinite. How many items can survivors throw in total.
l4d2_holdout_throw "-1"

// 0=Off. Maximum time before allowing the survivors to give an item.
l4d2_holdout_time_max "90"

// 0=Off. Minimum time before allowing the survivors to give an item.
l4d2_holdout_time_min "45"

// Survivor Bot Holdout plugin version.
l4d2_holdout_version 


Changes:
Code:
1.9 (29-Apr-2022)
    - Changed commands "sm_holdout" and "sm_holdout_temp" to accept the parameter "0" to spawn bots with random weapons.
    - Thanks to "kot4404" for the idea and some code.

1.8 (21-Sep-2021)
    - Now spawns L4D2 Survivors as holdout Survivors!
    - L4D2 Survivors may use some new voice lines when throwing items.
    - Changed from using hard coded offsets for weapon ammo. Thanks to "Root" for the method.
    - Replaced input "Kill" with "RemoveEntity". Now requires SourceMod 1.10 or newer.

1.7 (09-Oct-2020)
    - Added plugin enabled check when using commands to prevent usage if turned off.
    - Automatically detects and blocks the plugin running on maps which spawn their own L4D1 holdout survivors.
    - Changed character number for Louis. Has no affect. Thanks to "Crasher_3637" for reporting.
    - Fixed round restart resetting the blocked map bool.

1.6 (10-May-2020)
    - Extra checks to prevent "IsAllowedGameMode" throwing errors.
    - Various changes to tidy up code.
    - Various optimizations and fixes.

1.5 (01-Apr-2020)
    - Fixed "IsAllowedGameMode" from throwing errors when the "_tog" cvar was changed before MapStart.

1.4.2 (03-Jul-2019)
    - Minor changes to code, has no affect and not required.

1.4.1 (28-Jun-2019)
    - Removed VScript file, directly executes the VScript code instead.

1.4 (03-Jun-2019)
    - Fixed conflicts with playable survivors, holdout survivors should now spawn correctly.
    - Changed cvar "l4d2_holdout_freeze" removed option 2 - memory patching method.
    - Removed cvar "l4d2_holdout_prevent". No longer required thanks to the latest fixes.
    - Removed gamedata dependency.

1.3 (05-May-2018)
    - Converted plugin source to the latest syntax utilizing methodmaps. Requires SourceMod 1.8 or newer.

1.2.2 (29-Apr-2017)
    - Fixed server crash on certain maps.

1.2.1 (04-Dec-2016)
    - Renamed some variables because of SourceMod updating reserved keywords.

1.2 (11-Jul-2013)
    - Added Bill to spawn list!
    - Updated gamedata txt file.

1.1 (07-Oct-2012)
    - Added cvar "l4d2_holdout_pile" to create ammo piles next to survivors with primary weapons.
    - Added cvar "l4d2_holdout_freeze" to optionally freeze bots in their place.
    - Changed the freeze method to memory patching, which prevents dust under the bots feet.
    - Requires the added gamedata "l4d2_holdout.txt" for memory patching.

1.0 (02-Jul-2012)
    - Initial release.

Installation:
  1. Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.

Updating from 1.3:
  • New cvars have been added: use the Cvar Configs Updater, or delete the old cvars config or manually add them.
Attached Files
File Type: sp Get Plugin or Get Source (l4d2_holdout.sp - 812 views - 43.7 KB)
__________________

Last edited by Silvers; 04-29-2022 at 09:50.
Silvers is offline