About:
This plugin address the unrealistic feature of firework crates exploding with no actual fireworks!
Video demonstration thanks to
simonseang.
Video demonstration thanks to
hell911.

Bugs:- l4d2_fireworks_allow_gas - This will only display fireworks from gascans which have not been picked up.
Thanks:- jjjapan - For the idea.
- Mr.RuyC - For helping testing and Portuguese translations.
- AtomicStryker - Suggestions to fix Scavenge issues.
- JoBarfCreepy - Helped testing.
Admin Commands: (requires "z" flag)
PHP Code:
sm_fireworks // Display fireworks at your crosshair.
sm_fw // ^^
CVars:
Saved to
l4d2_fireworks_party.cfg in your servers
\cfg\sourcemod\ folder.
PHP Code:
// 0=Plugin off, 1=Plugin on.
l4d2_fireworks_allow "1"
// Allow gascan explosions to display fireworks (only works on cans which have not been picked up).
l4d2_fireworks_allow_gas "0"
// Allow oxygen tank explosions to display fireworks.
l4d2_fireworks_allow_oxygen "0"
// Allow propane tank explosions to display fireworks.
l4d2_fireworks_allow_propane "0"
// 0=Off. How long zombies are attracted to firework explosions.
l4d2_fireworks_chase "15"
// Percentage of gascans to convert into firework crates.
l4d2_fireworks_convert_gas "50"
// Percentage of oxygen tanks to convert into firework crates.
l4d2_fireworks_convert_oxygen "50"
// Percentage of propane tanks to convert into firework crates.
l4d2_fireworks_convert_propane "50"
// Maximum delayed fireworks to display (0 disables delayed).
l4d2_fireworks_delay_max "10"
// Minimum delayed fireworks to display.
l4d2_fireworks_delay_min "3"
// Randomise how many delayed fireworks display. 0=Max, 1=Random.
l4d2_fireworks_delay_ran "1"
// Max time after explosion for delayed fireworks to be created.
l4d2_fireworks_delay_time_max "10.0"
// Min time after explosion before delayed fireworks can show.
l4d2_fireworks_delay_time_min "0.2"
// Maximum fireworks to display on initial explosion (0 disables).
l4d2_fireworks_init_max "3"
// Minimum fireworks to display on initial explosion.
l4d2_fireworks_init_min "0"
// Turn on the plugin in these game modes, separate by commas (no spaces). (Empty = all).
l4d2_fireworks_modes ""
// Turn off the plugin in these game modes, separate by commas (no spaces). (Empty = none).
l4d2_fireworks_modes_off ""
// Turn on the plugin in these game modes. 0=All, 1=Coop, 2=Survival, 4=Versus, 8=Scavenge. Add numbers together.
l4d2_fireworks_modes_tog "0"
// Which fireworks to display. Bit flags, add up the numbers. 1=Red; 2=Blue; 4=Gold; 8=Flash.
l4d2_fireworks_type "15"
// Fireworks Party plugin version.
l4d2_fireworks_version
Changes:
Code:
1.11 (18-Aug-2023)
- Fixed compile errors on SM 1.12.
1.10 (30-Sep-2020)
- Fixed compile errors on SM 1.11.
1.9 (10-May-2020)
- Extra checks to prevent "IsAllowedGameMode" throwing errors.
- Various changes to tidy up code.
1.8 (01-Apr-2020)
- Fixed "IsAllowedGameMode" from throwing errors when the "_tog" cvar was changed before MapStart.
1.7.1 (28-Jun-2019)
- Changed PrecacheParticle function method.
1.7 (05-May-2018)
- Converted plugin source to the latest syntax utilizing methodmaps. Requires SourceMod 1.8 or newer.
- Fixed "l4d2_fireworks_modes_tog" was never activated.
1.6 (10-May-2012)
- Added cvar "l4d2_fireworks_modes" to control which game modes the plugin works in.
- Added cvar "l4d2_fireworks_modes_off" same as above.
- Added cvar "l4d2_fireworks_modes_tog" same as above.
- Optimized the plugin by hooking cvar changes.
- Fixed a bug which could cause a server to lock up.
- Removed max entity check and related error logging.
1.5 (22-May-2011)
- Added check for scavenge items to disable converting of gascans.
- Added check to not spawn fireworks when GetEntityCount reaches MAX_ENTITIES.
- Added 6 second delay after the first player spawns or round_start to convert items to firework crates.
- Changed cvar defaults for "l4d2_fireworks_convert_propane", "l4d2_fireworks_convert_oxygen", "l4d2_fireworks_convert_gas" to "50".
- Changed cvar default for "l4d2_fireworks_chase" from 10 to 15.
- Changed cvar default for "l4d2_fireworks_allow_gas" from 1 to 0.
1.4 (18-May-2011)
- Added cvar "l4d2_fireworks_chase" - which controls how long zombies are attracted to firework explosions.
1.3 (10-Apr-2011)
- Added admin command "sm_fw" or "sm_fireworks" to spawn fireworks on crosshair position.
1.2 (03-Apr-2011)
- Added cvar "l4d2_fireworks_allow_gas" to display fireworks on gascan explosions.
- Added cvar "l4d2_fireworks_allow_oxygen" to display fireworks on oxygen tank explosions.
- Added cvar "l4d2_fireworks_allow_propane" to display fireworks on propane tank explosions.
- Added cvar "l4d2_fireworks_convert_oxygen" to convert a percentage of oxygen tanks into firework crates.
- Added cvar "l4d2_fireworks_convert_propane" to convert a percentage of propane tanks into firework crates.
1.1 (02-Apr-2011)
- Added cvar "l4d2_fireworks_convert_gas" to convert a percentage of gascans into firework crates.
- Changed various default cvars and cvar limits.
1.0 (29-Mar-2011)
- Initial release.
Installation:- Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.
Updating from 1.5 or older:- New cvars have been added: use the Cvar Configs Updater, or delete the old cvars config or manually add them.