AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D & L4D2] Special Infected Immunities (v1.1, 09-10-2018) (https://forums.alliedmods.net/showthread.php?t=310443)

Psyk0tik 09-03-2018 17:39

[L4D & L4D2] Special Infected Immunities (v1.1, 09-10-2018)
 
4 Attachment(s)
Donate to Motivate

Introduction

This plugin is a rewrite of [L4D] Fire Immunity Specials.

New Features/Differences

- Supports both games.
- Uses SDKHook_OnTakeDamage instead of player_hurt event, which allows for more options and flexibility.
- Provides different types of immunities (Bullet, Explosive, Fire, and Melee).
- Provides options for enabling/disabling the plugin in different gamemodes and gamemode types. (Thanks Silvers!)
- Overall less code and better optimization.

ConVars

PHP Code:

// Give the following special infected bullet immunity.
// Combine numbers in any order for different results.
// 1: Smoker
// 2: Boomer
// 3: Hunter
// 4: Spitter
// 5: Jockey
// 6: Charger
// 7: Tank
// -
// Default: "35"
sii_bullet_immunity "35"

// Disable Special Infected Immunities in these gamemodes.
// Separate by commas.
// Empty: None
// Not empty: Disable in these gamemodes.
// -
// Default: ""
sii_disabled_gamemodes ""

// Enable Special Infected Immunities?
// 0: OFF
// 1: ON
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sii_enable_plugin "1"

// Enable Special Infected Immunities in these gamemodes.
// Separate by commas.
// Empty: All
// Not empty: Enable in these gamemodes.
// -
// Default: ""
sii_enabled_gamemodes ""

// Give the following special infected explosive immunity.
// Combine numbers in any order for different results.
// 1: Smoker
// 2: Boomer
// 3: Hunter
// 4: Spitter
// 5: Jockey
// 6: Charger
// 7: Tank
// -
// Default: "16"
sii_explosive_immunity "16"

// Give the following special infected fire immunity.
// Combine numbers in any order for different results.
// 1: Smoker
// 2: Boomer
// 3: Hunter
// 4: Spitter
// 5: Jockey
// 6: Charger
// 7: Tank
// -
// Default: "7"
sii_fire_immunity "7"

// Enable Special Infected Immunities in these gamemode types.
// 0: All
// 1: Coop modes only.
// 2: Versus modes only.
// 4: Survival modes only.
// 8: Scavenge modes only.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "15.000000"
sii_gamemode_types "0"

// Give the following special infected melee immunity.
// Combine numbers in any order for different results.
// 1: Smoker
// 2: Boomer
// 3: Hunter
// 4: Spitter
// 5: Jockey
// 6: Charger
// 7: Tank
// -
// Default: "24"
sii_melee_immunity "24" 

Bugs

I'm not sure. Let me know.

Notes

1. The config file will be generated in the default cfg/sourcemod folder.
2. Explosive ammo counts as both bullet and explosive damage.
3. Incendiary ammo counts as both bullet and fire damage.
4. M60 damage counts as both bullet and explosive damage.

Requests

I don't know. Post one below and I'll look into it.

Requirement

SM 1.8+

Installation

1. Place special_infected_immunities.smx inside plugins folder.

Credits

Baz Newt - For the Fire Immunity Specials plugin.
Lux - For valuable advise and input.
Silvers - For the code to enable/disable the plugin in certain gamemodes and gamemode types.

Changelog

Spoiler

Mi.Cura 09-03-2018 18:15

Re: [L4D & L4D2] Special Infected Immunities
 
Nice job, Crasher

Thanks for this...:bacon!:

Psyk0tik 09-11-2018 02:39

Re: [L4D & L4D2] Special Infected Immunities (v1.1, 09-10-2018)
 
Version 1.1 is out!

1. Fixed the issue with Tanks not getting extinguished when given fire immunity.

Dragokas 10-17-2019 10:28

Re: [L4D & L4D2] Special Infected Immunities (v1.1, 09-10-2018)
 
Quote:

// Give the following special infected bullet immunity.
// Combine numbers in any order for different results.
// 1: Smoker
// 2: Boomer
// 3: Hunter
// 4: Spitter
// 5: Jockey
// 6: Charger
// 7: Tank
// -
// Default: "35"
Where is my lovely witch? :D

gamer_kanelita 10-29-2021 11:39

Re: [L4D & L4D2] Special Infected Immunities (v1.1, 09-10-2018)
 
is there any way that tank is immune to fire without losing the effect of burning the tank?

Psyk0tik 10-29-2021 14:44

Re: [L4D & L4D2] Special Infected Immunities (v1.1, 09-10-2018)
 
Quote:

Originally Posted by gamer_kanelita (Post 2761957)
is there any way that tank is immune to fire without losing the effect of burning the tank?

Just comment out line 70.

Before:
PHP Code:

CreateTimer(0.1tTimerFireBlock_TIMER_FLAG_NO_MAPCHANGE|TIMER_REPEAT); 

After:
PHP Code:

//CreateTimer(0.1, tTimerFireBlock, _, TIMER_FLAG_NO_MAPCHANGE|TIMER_REPEAT); 


gamer_kanelita 10-29-2021 16:12

Re: [L4D & L4D2] Special Infected Immunities (v1.1, 09-10-2018)
 
super worked thanks :abeja:

Toranks 04-16-2022 09:49

Re: [L4D & L4D2] Special Infected Immunities (v1.1, 09-10-2018)
 
Is there any plugins that nerf (but not nullifies) melee damage on specials? So I cant kill any special except tanks and witches with only 1 or 2 melee hits when specials have high HP with z_charger_health 1500 for example

EDIT:
I think I could adapt this plugin by changing just one value

Code:

                else if ((damagetype & DMG_SLASH || damagetype & DMG_CLUB) && ((bIsBlocked(sMeleeTypes, "1", "1") && bIsSmoker(victim)) || (bIsBlocked(sMeleeTypes, "2", "2") && bIsBoomer(victim)) || (bIsBlocked(sMeleeTypes, "3", "3") && bIsHunter(victim)) || (bIsBlocked(sMeleeTypes, "4", "4") && bIsSpitter(victim)) || (bIsBlocked(sMeleeTypes, "5", "7") && bIsJockey(victim)) || (bIsBlocked(sMeleeTypes, "6", "6") && bIsCharger(victim)) || (bIsBlocked(sMeleeTypes, "7", "7") && bIsTank(victim))))
                {
                        damage = 0.0;
                        return Plugin_Handled;
                }
        }

Quote:

damage = 250.0;
EDIT: Doesn't work, still become inmune...

EDIT2: It seems to be related to the float value, which doesn't apply to melee. The plugin seems to exist, but I can't find it.
https://forums.alliedmods.net/showthread.php?t=236898

EDIT3: Finally, I find a plugin that does the work https://forums.alliedmods.net/showthread.php?t=154366

Psyk0tik 05-14-2022 04:01

Re: [L4D & L4D2] Special Infected Immunities (v1.1, 09-10-2018)
 
Quote:

Originally Posted by Toranks (Post 2776984)
Is there any plugins that nerf (but not nullifies) melee damage on specials? So I cant kill any special except tanks and witches with only 1 or 2 melee hits when specials have high HP with z_charger_health 1500 for example

EDIT: Doesn't work, still become inmune...

EDIT2: It seems to be related to the float value, which doesn't apply to melee. The plugin seems to exist, but I can't find it.
https://forums.alliedmods.net/showthread.php?t=236898

EDIT3: Finally, I find a plugin that does the work https://forums.alliedmods.net/showthread.php?t=154366

Yeah, setting the value for "damage" does not matter because of the line after that which is "return Plugin_Handled". Whenever you return "Plugin_Handled" in a damage hook, the damage is blocked.

Toranks 05-14-2022 09:40

Re: [L4D & L4D2] Special Infected Immunities (v1.1, 09-10-2018)
 
Is there a chance to make the Smoker immune to instakills when he tongue-grab a survivor, but still take normal or increased damage? When a smoker grabs me and I headshoot him with any weapon, I kill him instantly (On other parts of the body, take increased damage, but it is fine for me). It would be more logical to release me, but if he still has enough HP, being able to resist shoots and run away. I'm looking for a plugin that does that and this is the closest thing I've found.


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

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