- Allows players to throw melee weapons. Press the Scope / Zoom button to throw (MMB - middle mouse button).
- Various ways to set damage, depending on weapon type and target.
- Video demonstration - Thanks to "sonic155" for recording.
Admin Commands: (requires "z" flag)
- Sev - For the request.
- Ethan Max - For also requesting and reminding me.
- Lux - Because why not.
sm_throwable_reload // Reloads the weapons damage data config.
Saved to l4d2_throwable_melee.cfg
in your servers \cfg\sourcemod\
// 0=Plugin off, 1=Plugin on.
// Turn on the plugin in these game modes, separate by commas (no spaces). (Empty = all).
// Turn off the plugin in these game modes, separate by commas (no spaces). (Empty = none).
// Turn on the plugin in these game modes. 0=All, 1=Coop, 2=Survival, 4=Versus, 8=Scavenge. Add numbers together.
// 0=Off. 1=Changes the thrown melee weapon into a boomerang returning to the thrower when it hits something.
// Minimum speed. How fast to throw a melee weapon, affects range
// Maximum speed. How fast to throw a melee weapon, affects range
// 0.0=Off, instant throw. Max time to get max speed. The longer players hold Zoom/Scope (MMB - middle mouse button) the faster they throw.
// 0=Off. 1=Spin top over. 2=Spin sideways. 3=Both randomly selected. Requires gamedata.
// Which melee weapons can be thrown: 1=Baseball Bat, 2=Cricket Bat, 4=Crowbar, 8=Frying Pan, 16=Guitar, 32=Fireaxe, 64=Golfclub, 128=Katana, 256=Knife, 512=Machete, 1024=Tonfa, 2047=All. 2048=Shield, 4096=Generic. Add numbers together.
// Throwable Melee Weapons plugin version.
- To fix the Tonfa not working change "l4d2_throwable_types" value to "2047".
- New feature: Throw distance - the longer you hold Zoom before releasing the further you throw. Requested by "MasterMind420".
- Added cvar "l4d2_throwable_speed_max" to set a maximum throwing speed when holding MMB. Minimum speed set by "l4d2_throwable_speed".
- Added cvar "l4d2_throwable_speed_time" to scale the throwing speed, how long the key must be held to reach maximum speed when letting go.
- Changed cvar "l4d2_throwable_types" value to "2047" to include the missing Frying Pan option.
- Boomerang type now verifies the players weapon slot is empty before equipping.
- Optimized throwing event CPU cycles by validating weapon in WeaponSwitch.
- Removed all commented out reference code.
- Fixed incorrect Linux gamedata signature causing crashing.
- Fixed the "l4d2_throwable_types" cvar using the wrong index.
- Fixed the Baseball Bat not working.
- Fixed the Golfclub not playing any sounds.
- Fixed the Tank not taking damage.
- Fixed truncating damage values with 4 numbers to 3.
- Fixed hitting when the melee is not moving or potentially not always hitting.
- Fixed hitting yourself.
- Removed TraceRay.
- Added cvar "l4d2_throwable_return" to enable a boomerang effect and return the weapon to thrower.
- Added support for "Riot Shield" melee type and "Generic" - any 3rd party melee weapon.
- Riot Shield requires extra scripts to enable, I do not support. You're on your own.
- Data config changed to add the new types.
- Changed from using max health cvars to reading the entities "m_iMaxHealth" value.
- Fixed incorrect percentage calculation when using the "hits" damage type.
- Replaced index numbers with enums for easier source readability.
- Added TraceRay to hit zombies directly in front of player. Thanks to "Lux" for suggesting.
- Replaced optional VPhysics extension with gamedata method. Thanks to "BHaType" for suggesting.
- Cvar "l4d2_throwable_spin" uses this method and requires the optional gamedata file.
- Fixed damage not crediting the owner.
- Added correct data config.
- Changed plugin to point to correct config.
- Changed plugin to remove VPhysics extension for now, since optional is not working.
- Initial release.
Updating from 1.4 or older:
- Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.
- Download the "l4d_throwable_melee.cfg" config file and put into your servers \addons\sourcemod\data\ folder.
- Optional: download the "l4d_throwable_melee.txt" gamedata file and put into your servers \addons\sourcemod\gamedata\ folder.
- New cvars have been added: use the Cvar Configs Updater, or delete the old cvars config or manually add them.