AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D & L4D2] Damage Explodes Grenades (1.11) [10-Jan-2024] (https://forums.alliedmods.net/showthread.php?t=334500)

Silvers 09-28-2021 21:37

[L4D & L4D2] Damage Explodes Grenades (1.11) [10-Jan-2024]
 
24 Attachment(s)
About:
  • Thanks to "backwards" for the idea.
  • Allows grenades to explode when damaged or ignite into flames when caught on fire and then detonate.



CVars:

Saved to l4d_explode_grenades.cfg in your servers \left4dead\cfg\sourcemod\ folder.

PHP Code:

// 0=Plugin off, 1=Plugin on.
l4d_explode_grenades_allow "1"

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

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

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

// 0=Off. 1=Boomer explosions can also explode grenades.
l4d_explode_grenades_boomer "0"

// 0.0=Instant. Delay exploding when damaged.
l4d_explode_grenades_delay_molo "1.5"

// 0.0=Instant. Delay exploding when damaged.
l4d_explode_grenades_delay_pipe "1.5"

// 0.0=Instant. Delay exploding when damaged.
l4d_explode_grenades_delay_vomi "0.0"

// "0=No explosion when picking up a damaged grenade. 1=Explode after the _delay cvars when picking up a damaged grenade.
l4d_explode_grenades_detonate "1"

// 0=Off. 1=On. Should _spawn grenades (those which can have multiple grenades in 1 spawn) be allowed to ignite or explode.
l4d_explode_grenades_spawners "1"

// After how many seconds does an ignited grenade detonate.
l4d_explode_grenades_time "5.0"

// Which types of grenades can ignite and then detonate. 1=Molotovs, 2=PipeBombs, 4=Vomit Jars. 7=All. Add numbers together.
l4d_explode_grenades_type "7"

// Which types of grenades can take damage and detonate. 1=Molotovs, 2=PipeBombs, 4=Vomit Jars. 7=All. Add numbers together.
l4d_explode_grenades_types "7"

// L4D2 only. Which types of upgrade ammo can detonate grenades. 0=None. 1=Incendiary ammo. 2=Explosive ammo. 3=Both.
l4d_explode_grenades_upgrade "3"

// Damage Explodes Grenades plugin version.
l4d_explode_grenades_version 



Changes:
Code:

1.11 (10-Jan-2024)
    - Changed the plugins on/off/mode cvars to use the "Left 4 DHooks" method instead of creating an entity.

1.10 (04-May-2022)
    - Added cvars "l4d_explode_grenades_delay_molo", "l4d_explode_grenades_delay_pipe" and "l4d_explode_grenades_delay_vomi" to delay explosion. Requested by "Voevoda".
    - Added cvar "l4d_explode_grenades_detonate" to determine if grenades can explode after being picked up.

1.9 (01-May-2022)
    - L4D2: Added cvar "l4d_explode_grenades_upgrade" to control if upgrade ammo can detonate grenades. Requested by "Voevoda".

1.8 (23-Apr-2022)
    - Compatibility update for "PipeBomb Damage Modifier" plugin. Thanks to "Shao" for reporting.

1.7 (27-Jan-2022)
    - Fixed copy paste mistake from last update sometimes throwing errors.

1.6 (26-Jan-2022)
    - Fixed spawners detonating when no grenades are visible. Thanks to "Shao" for reporting.

1.5 (23-Oct-2021)
    - Fixed error from invalid clients.

1.4 (07-Oct-2021)
    - Fixed not ignoring Boomer explosions. Thanks to "swiftswing1" for reporting.

1.3 (07-Oct-2021)
    - Changed the Boomer detection method to allow Pipe Bombs to explode nearby grenades.
    - Fixed some errors when attacker was invalid. Thanks to "swiftswing1" for reporting.

1.2 (07-Oct-2021)
    - Fixed invalid entity errors. Thanks to "swiftswing1" for reporting.

1.1 (06-Oct-2021)
    - Added cvar "l4d_explode_grenades_boomer" to control if Boomer explosions can explode grenades. Requested by "Shao".
    - Consolidated some code.

1.0 (29-Sep-2021)
    - Initial release.
    - Requires Left4DHooks 1.58 or newer.



Requirements:
  1. Left 4 DHooks Direct 1.58 or newer.



Installation:
DO NOT click 'Get Plugin' or it will fail to compile because this plugin requires Left4DHooks!
  1. Download the .smx file and put into your servers \addons\sourcemod\plugins folder.

Shao 10-05-2021 18:24

Re: [L4D & L4D2] Damage Explodes Grenades (1.0) [29-Sep-2021]
 
This is really neat! I'd be nice to have a feature which alerts in chat who may have shot the grenades and what not. Like one of Marttt plugins.

Also Boomer death seems to influence the grenades, perhaps having a toggle for this would be nice since it can lead to very chaotic situations.

Silvers 10-06-2021 05:43

Re: [L4D & L4D2] Damage Explodes Grenades (1.1) [29-Sep-2021]
 
Code:

1.1 (06-Oct-2021)
    - Added cvar "l4d_explode_grenades_boomer" to control if Boomer explosions can explode grenades. Requested by "Shao".
    - Consolidated some code.

Done.

Hints maybe one day.

swiftswing1 10-06-2021 06:56

Re: [L4D & L4D2] Damage Explodes Grenades (1.1) [29-Sep-2021]
 
hey Silvers,

i'm getting this error:

Quote:

L 10/06/2021 - 21:55:14: [SM] Exception reported: Entity 4 (4) is invalid
L 10/06/2021 - 21:55:14: [SM] Blaming: l4d_explode_grenades.smx
L 10/06/2021 - 21:55:14: [SM] Call stack trace:
L 10/06/2021 - 21:55:14: [SM] [0] GetEntPropVector
L 10/06/2021 - 21:55:14: [SM] [1] Line 453, C:\Servers\L4D2\left4dead2\addons\sourcemod\s cripting\l4d_explode_grenades.sp::TimerDetona te

Silvers 10-06-2021 07:10

Re: [L4D & L4D2] Damage Explodes Grenades (1.1) [29-Sep-2021]
 
Should be fixed in latest.

swiftswing1 10-06-2021 22:50

Re: [L4D & L4D2] Damage Explodes Grenades (1.1) [29-Sep-2021]
 
sorry i'm still getting the error.
i had a look at my logs and it seems the 'Exception reported: Entity 4 (4) is invalid' was a one off - the error i get slammed with is 'Exception reported: Entity 2 (2) is invalid' (i don't know if that makes a difference).

regardless, the error seems to happen when i shoot to explode a molotov near a pipebomb and/or bile jar, but neither pipebomb or bile jar explodes from molotov fire. i have a backup of v1.0 and this error doesn't occur.

default cvars, sm10, windows
Quote:

01 "Admin File Reader" (1.10.0.6502) by AlliedModders LLC
02 "Admin Help" (1.10.0.6502) by AlliedModders LLC
03 "Admin Menu" (1.10.0.6502) by AlliedModders LLC
04 "Anti-Flood" (1.10.0.6502) by AlliedModders LLC
05 "Basic Ban Commands" (1.10.0.6502) by AlliedModders LLC
06 "Basic Chat" (1.10.0.6502) by AlliedModders LLC
07 "Basic Comm Control" (1.10.0.6502) by AlliedModders LLC
08 "Basic Commands" (1.10.0.6502) by AlliedModders LLC
09 "Basic Info Triggers" (1.10.0.6502) by AlliedModders LLC
10 "Basic Votes" (1.10.0.6502) by AlliedModders LLC
11 "Client Preferences" (1.10.0.6502) by AlliedModders LLC
12 "Fun Commands" (1.10.0.6502) by AlliedModders LLC
13 "Fun Votes" (1.10.0.6502) by AlliedModders LLC
14 "[L4D & L4D2] Damage Explodes Grenades" (1.1) by SilverShot (idea by backwards)
15 "[L4D & L4D2] Left 4 DHooks Direct" (1.60) by SilverShot
16 "Sound Commands" (1.10.0.6502) by AlliedModders LLC
17 "[L4D2] Weapon Drop" (1.6) by Machine, dcx2, Electr000999 /z, Senip, Shao

Silvers 10-07-2021 05:22

Re: [L4D & L4D2] Damage Explodes Grenades (1.2) [07-Oct-2021]
 
ooops thanks I messed up the lines. Should be working again.

Code:

1.2 (07-Oct-2021)
    - Fixed invalid entity errors. Thanks to "swiftswing1" for reporting.


swiftswing1 10-07-2021 08:03

Re: [L4D & L4D2] Damage Explodes Grenades (1.2) [07-Oct-2021]
 
thanks, molotov works now. however, pipebomb still won't detonate nearby grenades (both molotov and bilejar) - it just flings them away. no errors in console this time.

Silvers 10-07-2021 08:36

Re: [L4D & L4D2] Damage Explodes Grenades (1.2) [07-Oct-2021]
 
Thanks, this is related to Boomer explosion. Will add proper boomer check and remove current hackish type.

Code:

1.3 (07-Oct-2021)
    - Changed the Boomer detection method to allow Pipe Bombs to explode nearby grenades.
    - Fixed some errors when attacker was invalid. Thanks to "swiftswing1" for reporting.


swiftswing1 10-07-2021 09:17

Re: [L4D & L4D2] Damage Explodes Grenades (1.3) [07-Oct-2021]
 
appreciate the quick turnaround time!

molotov and pipebomb detonation works good now. unfortunately, new version seems to have messed up the "l4d_explode_grenades_boomer" cvar - grenades detonate on boomer explosion regardless of it being turned on or off.


All times are GMT -4. The time now is 09:04.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.