AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D & L4D2] Incapped Weapons Patch (1.36) [25-Mar-2024] (https://forums.alliedmods.net/showthread.php?t=322859)

Silvers 04-05-2020 21:43

[L4D & L4D2] Incapped Weapons Patch (1.36) [25-Mar-2024]
 
55 Attachment(s)
Related Plugins:

About:
  • Memory patch method to use weapons while incapped, instead of changing weapons scripts.
  • Press the keys 1, 2, 3, 4, 5 to switch Weapons. Mouse scroll does not work.
  • Grenades and Melee weapons can be used while incapped. Survivors appear to stand up to throw grenades, this can be prevented by having Left4DHooks installed.
  • Supports using Pills and Adrenaline to heal or revive a player, in version 1.16 and newer.


Weapon Fire Rate:
  • Recommended: WeaponHandling_API by Lux. Set wh_use_incap_cycle_cvar cvar to "0". This changes all weapon fire rates to their normal speed.
  • Alternatively set the games cvar survivor_incapacitated_cycle_time to "0.1" but this will modify it for all weapons and not return them to their correct speed.


Thanks:
  • xZk - For the original plugin and ideas.
  • Lux - For scripting advice and melee patch method.
  • MasterMind420 - For scripting advice.


Admin Commands: (requires "z" flag)

PHP Code:

sm_incap   // Incapacitated a player. Usage: [#userid|name] or no args to select self. 


Cvars:

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

PHP Code:

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

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

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

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

// L4D2 only: 0.0=Off. How many seconds a player must wait after using Adrenaline to be revived.
l4d_incapped_weapons_delay_adren "5.0"

// 0.0=Off. How many seconds a player must wait after using Pills to be revived.
l4d_incapped_weapons_delay_pills "5.0"

// 0=Off. 1=Print to chat. 2=Print to hint box. Display to player how long until they are revived, when using a _delay cvar.
l4d_incapped_weapons_delay_text "2"

// 0.0=None. 1.0=Default damage. Scales an incapped Survivors friendly fire damage to other Survivors. Multiplied against the games survivor_friendly_fire* cvars.
l4d_incapped_weapons_friendly "1.0"

// L4D2 only: -1=Revive player. 0=Off. How much to heal a player when they use Adrenaline whilst incapped.
l4d_incapped_weapons_heal_adren "50"

// -1=Revive player. 0=Off. How much to heal a player when they use Pain Pills whilst incapped.
l4d_incapped_weapons_heal_pills "50"

// 0=Off. When reviving with healing items, should player enter black and white status. 1=Pills. 2=Adrenaline. 3=Both.
l4d_incapped_weapons_heal_revive "0"

// 0=Off. 1=Print to chat. 2=Print to hint box. Print a message when incapacitated that Pills/Adrenaline can be used to heal/revive.
l4d_incapped_weapons_heal_text "1"

// How much health to give a player when they revive themselves.
l4d_incapped_weapons_health "30"

// L4D2 only: 0=No friendly fire. 1=Allow friendly fire. When using Melee weapons should they hurt other Survivors.
l4d_incapped_weapons_melee "0"

// L4D2 only: 0=Don't give pistol (allows Melee weapons to be used). 1=Give pistol (game default).
l4d_incapped_weapons_pistol "0"

// Empty string to allow all. Prevent these weapon IDs from being used while incapped. See below for details.
// L4D2: default blocks all medkits/upgrade ammo. To block grenades add "13,14,25"
l4d_incapped_weapons_restrict "12,24,30,31"

// L4D1: default blocks medkits. To block grenades add "9,10" e.g: "8,12,9,10"
l4d_incapped_weapons_restrict "8"

// Play revive animation: 0=Off. 1=On and damage can stop reviving. 2=Damage will interrupt animation and restart reviving. 3=Damage does not interrupt reviving. 4=Give god mode when reviving
l4d_incapped_weapons_revive "3"

// 0=Block throwing grenade animation to prevent standing up during throw (requires Left4DHooks plugin). 1=Allow throwing animation.
l4d_incapped_weapons_throw "0"

// Incapped Weapons plugin version.
l4d_incapped_weapons_version 



Weapon Restriction Cvar:

The cvar l4d_incapped_weapons_restrict uses Weapon IDs to restrict their usage. String must be comma separated.

Complete list:

Spoiler



Changes:
Code:

1.36 (25-Mar-2024)
    - Fixed a bug with the self revive system. Thanks to "MasterMind420" for reporting.
    - Plugin now prevents switching to healing items while being revive and equips a weapon instead.

1.35 (05-Mar-2024)
    - Fixed revive exploit. Thanks to "glhf3000" for reporting.

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

1.33 (25-Oct-2023)
    - Now "l4d_incapped_weapons_revive" value "2" will interrupt reviving if the player tries to move left/right/forwards/backwards (forward cannot be not detected with Incapped Crawling).
    - Fixed command "sm_incap" not incapacitating someone if they had over 100 health.
    - Fixed being able to shoot while the revive animation was playing.

1.32 (25-Oct-2023)
    - Added cvar "l4d_incapped_weapons_revive" to put the player in 3rd person (L4D2 only) and play the revive animation. Thanks to "MasterMind420" for parts of the code and ideas.
    - Added command "sm_incap" to incapacitated yourself or targeted players.

1.31 (02-Oct-2023)
    - Fixed going AFK breaking self revive. Thanks to "Automage" for reporting.
    - Now the plugin will throw an error and prevent itself loading if any of the addresses are already patched.

1.30 (18-Aug-2023)
    - Added cvar "l4d_incapped_weapons_health" to set a players main health when they revive themselves. Requested by "Shao".
    - Now sets the players temporary health on revive to "survivor_revive_health" games cvar value.

1.29 (19-Jun-2023)
    - Fixed "CanDeploy" byte mis-match error. Thanks to "Mika Misori" for reporting.

1.28 (10-Mar-2023)
    - L4D2: Fixed grenade throwing animation not being blocked. Thanks to "BystanderZK" for reporting.

1.27 (20-Feb-2023)
    - L4D2: Fixed Survivors not taking damage from incapped players when reviving them. Thanks to "Lux" and "Psyk0tik" for help.
    - L4D2: GameData file updated.

1.26 (19-Feb-2023)
    - Various small fixes with late loading and unloading the plugin.
    - Fixed cvar "l4d_incapped_weapons_friendly" not correctly calculating damage applied to Survivors from weapons.
    - L4D2: Fixed Survivors not taking damage from incapped players. Thanks to "BystanderZK" for reporting and "Marttt" for testing on Linux.
    - L4D2: GameData file updated.

1.25 (10-Feb-2023)
    - Fixed error when "CanDeploy" is already patched, for whatever reason. Thanks to "knifeeeee" for reporting.

1.24 (24-Jan-2023)
    - Added cvar "l4d_incapped_weapons_friendly" to scale friendly fire damage from incapped Survivors. Requested by "choppledpickusfungus".

1.23 (08-Jan-2023)
    - Plugin now requires SourceMod 1.11 version of DHooks.
    - Plugin now requires "Left 4 DHooks Direct" plugin, used for Adrenaline and Reviving.
    - Fixed not always healing or reviving. Thanks to "BystanderZK" for reporting.
    - Fixed not always allowing pills and adrenaline while incapped, when health was above 100. Thanks to "apples1949" for reporting.
    - Added Simplified Chinese translations. Thanks to "apples1949" for providing.
    - Translations updated to use a better title instead of "[Revive]" when healing.
    - GameData file updated.

1.22 (24-Dec-2022)
    - Fixed printing the color codes instead of using them when translations are missing. Thanks to "HarryPotter" for reporting.
    - Fixed displaying hints about using Pills/Adrenaline when they are restricted. Thanks to "HarryPotter" for reporting.
    - Fixed infinite animation loop when holding mouse1 with Adrenaline. Thanks to "ForTheSakura" for reporting.
    - Fixed displaying the wrong hint for Adrenaline when revive option was set.

1.21 (21-Dec-2022)
    - Added cvars "l4d_incapped_weapons_delay_pills" and "l4d_incapped_weapons_delay_adren" to set a delay before reviving. Requested by "BystanderZK".
    - Added cvar "l4d_incapped_weapons_delay_text" to optionally display a hint when using a delayed revive.
    - Added cvar "l4d_incapped_weapons_heal_text" to display a hint about using pills or adrenaline when incapacitated.
    - Added optional translations support for delayed revive.

1.20 (12-Dec-2022)
    - Added cvar "l4d_incapped_weapons_heal_revive" to control if players should revive into black and white status. Requested by "BystanderZK".
    - Fixed cvar "l4d_incapped_weapons_throw" having inverted logic. Thanks to "BystanderZK" for reporting.
    - Fixed the PipeBomb effects not displaying. Thanks to "BystanderZK" for reporting.
    - Fixed taking pills in L4D1 not healing or reviving.
    - These changes are compatible with the "Heartbeat" plugin.

1.19 (09-Dec-2022)
    - Forgot to remove debug messages printing to chat. Thanks to "NoroHime" for reporting.

1.18 (06-Dec-2022)
    - Added extra checks when using Pills and Adrenaline.
    - Fixed equipping melee weapons reducing all damage given to other Survivors. Thanks to "gabuch2" for reporting.

1.17 (05-Dec-2022)
    - Fixed unhooking the wrong Think function, breaking the "pain_pills_health_threshold" cvar.
    - Changed cvars "l4d_incapped_weapons_heal_adren" and "l4d_incapped_weapons_heal_pills" to accept "-1" which will revive a player.

1.16 (05-Dec-2022)
    - Added feature to allow Pills and Adrenaline to be used while incapped. Requires the "Left 4 DHooks" plugin.
    - Added cvars "l4d_incapped_weapons_heal_adren" and "l4d_incapped_weapons_heal_pills" to control healing amount while incapped.

1.15 (22-Nov-2022)
    - Fixed cvar "l4d_incapped_weapons_throw" not preventing standing up animation when plugin is late loaded. Thanks to "TBK Duy" for reporting.

1.14 (12-Nov-2022)
    - Added cvar "l4d_incapped_weapons_throw" to optionally prevent the standing up animation when throwing grenades.
    - Now optionally uses "Left 4 DHooks" plugin to prevent standing up animation when throwing grenades.

1.13a (09-Jul-2021)
    - L4D2: Fixed GameData file from the "2.2.2.0" update.

1.13 (16-Jun-2021)
    - L4D2: Optimized plugin by resetting Melee damage hooks on map end and round start.
    - L4D2: Compatibility update for "2.2.1.3" update. Thanks to "Dragokas" for fixing.
    - GameData .txt file updated.

1.12 (08-Mar-2021)
    - Added cvar "l4d_incapped_weapons_melee" to control Melee weapon damage to Survivors. Thanks to "Mystik Spiral" for reporting.

1.11 (15-Jan-2021)
    - Fixed weapons being blocked when incapped and changing team. Thanks to "HarryPotter" for reporting.

1.10 (10-May-2020)
    - Added better error log message when gamedata file is missing.
    - Extra checks to prevent "IsAllowedGameMode" throwing errors.

1.9 (12-Apr-2020)
    - Now keeps the active weapon selected unless it's restricted.
    - Fixed not being able to switch to melee weapons.
    - Fixed pistols possibly disappearing sometimes.
    - Fixed potential of duped pistols when dropped after incap.
    - Extra checks to prevent "IsAllowedGameMode" throwing errors.

1.8 (09-Apr-2020)
    - Fixed again not always restricting weapons correctly on incap. Thanks to "MasterMind420" for reporting.

1.7 (08-Apr-2020)
    - Fixed not equipping melee weapons when allowed on incap.

1.6 (08-Apr-2020)
    - Fixed breaking pistols, due to the last update.

1.5 (08-Apr-2020)
    - Fixed ammo being wiped when incapped, due to 1.3 update. Thanks to "Dragokas" for reporting.
    - Fixed not always restricting weapons correctly on incap. Thanks to "MasterMind420" for reporting.

1.4 (07-Apr-2020)
    - Fixed throwing a pistol when dual wielding. Thanks to "MasterMind420" for reporting.

1.3 (07-Apr-2020)
    - Fixed not equipping a valid weapon when the last equipped weapon was restricted.
    - Removed the ability to block pistols.
    - Thanks to "MasterMind420" for reporting.

1.2 (07-Apr-2020)
    - Fixed L4D1 Linux crashing. Only the plugin updated. Thanks to "Dragokas" for testing.

1.1 (07-Apr-2020)
    - Fixed hooking the L4D2 pistol cvar in L4D1. Thanks to "Alliance" for reporting.

1.0 (06-Apr-2020)
    - Initial release.



Requirements:
  1. Left 4 DHooks Direct plugin.
  2. SourceMod version 1.11 or newer.


Installation:
DO NOT click 'Get Plugin' or it will fail to compile because this plugin requires Left 4 DHooks Direct!
  1. Download the .smx file and put into your servers \addons\sourcemod\plugins folder.
  2. Download the l4d_incapped_weapons.txt gamedata file and put into your servers \addons\sourcemod\gamedata\ folder.
  3. Download "translations_incapped_weapons.zip" and extract the "translations" folder to your servers \addons\sourcemod\ folder.


Updating from 1.23 or older:
  • New cvars have been added: use the Cvar Configs Updater, or delete the old cvars config or manually add them.

Updating from 1.29 or older:
  • GameData file must be updated.

SkiPlix 04-06-2020 00:52

Re: [L4D & L4D2] Incapped Weapons Patch (1.0) [06-Apr-2020]
 
Finally

Marttt 04-06-2020 01:58

Re: [L4D & L4D2] Incapped Weapons Patch (1.0) [06-Apr-2020]
 
Nice, also while incapped, friendly fire seems to be deactivated, is it possible to add a toggle for this?

rekcah 04-06-2020 05:25

Re: [L4D & L4D2] Incapped Weapons Patch (1.0) [06-Apr-2020]
 
thankyou, works way better then the workshop addon I was using for incapped weapons, however I think the single shot shotguns may be bugged, I only tested briefly but it seemed like I couldn't freely swap back and forth between melee and shotgun.

Silvers 04-06-2020 19:34

Re: [L4D & L4D2] Incapped Weapons Patch (1.0) [06-Apr-2020]
 
Code:

1.1 (06-Apr-2020)
    - Fixed hooking the L4D2 pistol cvar in L4D1. Thanks to "Alliance" for reporting.


Quote:

Originally Posted by rekcah (Post 2691154)
thankyou, works way better then the workshop addon I was using for incapped weapons, however I think the single shot shotguns may be bugged, I only tested briefly but it seemed like I couldn't freely swap back and forth between melee and shotgun.

Linux? I tested on Windows and could switch between all shotguns and melee etc. Can't see Linux being any different. Did you change the restriction cvar and block shotguns maybe?

Dragokas 04-06-2020 22:06

Re: [L4D & L4D2] Incapped Weapons Patch (1.2) [07-Apr-2020]
 
Very useful. Thank you !!!

bullet28 04-06-2020 23:24

Re: [L4D & L4D2] Incapped Weapons Patch (1.2) [07-Apr-2020]
 
Great plugin, thank you! Have you tried to make weapon fire cycletime as normal? I wondering if changing nextAttack prop will be enough.. but if you haven't done this as variable maybe I shouldn't even try :D And I hope there will be some workaround in future updates for a throwing animation (mayble block anim at all), coz when character stand up for a throw it's looks a bit confusing. I've recorded a video in case you didn't know about this https://youtu.be/g-voYwWSrug

Silvers 04-07-2020 01:00

Re: [L4D & L4D2] Incapped Weapons Patch (1.2) [07-Apr-2020]
 
Quote:

Originally Posted by bullet28 (Post 2691317)
Great plugin, thank you! Have you tried to make weapon fire cycletime as normal? I wondering if changing nextAttack prop will be enough.. but if you haven't done this as variable maybe I shouldn't even try :D And I hope there will be some workaround in future updates for a throwing animation (mayble block anim at all), coz when character stand up for a throw it's looks a bit confusing. I've recorded a video in case you didn't know about this https://youtu.be/g-voYwWSrug

haha uhm not sure what can be done. Would have to require Left4DHooks to block/change the animation. I mean that could be optional requirement, so maybe I'll add. Thanks for notifying.

For weapon fire rates while incapped you can use: WeaponHandling_API by Lux. Or set survivor_incapacitated_cycle_time to "0.1".

Dragokas 04-07-2020 19:16

Re: [L4D & L4D2] Incapped Weapons Patch (1.4) [07-Apr-2020]
 
When you go incapped, number of reserve ammo become zero.

Silvers 04-07-2020 23:23

Re: [L4D & L4D2] Incapped Weapons Patch (1.5) [08-Apr-2020]
 
Thanks, fixed.

Code:

1.8 (09-Apr-2020)
    - Fixed again not always restricting weapons correctly on incap. Thanks to "MasterMind420" for reporting.

1.7 (08-Apr-2020)
    - Fixed not equipping melee weapons when allowed on incap.

1.6 (08-Apr-2020)
    - Fixed breaking pistols, due to the last update.

1.5 (08-Apr-2020)
    - Fixed ammo being wiped when incapped, due to 1.3 update. Thanks to "Dragokas" for reporting.
    - Fixed not always restricting weapons correctly on incap. Thanks to "MasterMind420" for reporting.

Now I think all these issues are finally fixes. Stupid index problems as usual, should it be != 0 or == 0. The simplest and most difficult side of programming sometimes.

Tonblader 04-09-2020 10:22

Re: [L4D & L4D2] Incapped Weapons Patch (1.8) [09-Apr-2020]
 
Can you add the option to select some object (slot 1,2,3,4,5), but without being able to use it?
It is needed for example to combine it with sm_drop
Considering even more, when one dies, the melee weapon does not drop

Silvers 04-09-2020 10:34

Re: [L4D & L4D2] Incapped Weapons Patch (1.8) [09-Apr-2020]
 
Quote:

Originally Posted by Tonblader (Post 2691955)
Can you add the option to select some object (slot 1,2,3,4,5), but without being able to use it?
It is needed for example to combine it with sm_drop
Considering even more, when one dies, the melee weapon does not drop

Then people will cry they can't use the equipped item, or fire their weapon etc. No. Feel free to modify and make your own custom version. Too much work and more potential for bugs just to cater 1 persons needs.

jamalsheref2 04-13-2020 09:10

Re: [L4D & L4D2] Incapped Weapons Patch (1.9) [12-Apr-2020]
 
its not working for l4d1

Silvers 04-13-2020 09:56

Re: [L4D & L4D2] Incapped Weapons Patch (1.9) [12-Apr-2020]
 
Quote:

Originally Posted by jamalsheref2 (Post 2693074)
its not working for l4d1

Is working for l4d1. Thanks. Missing gamedata?

strikeraot 07-11-2020 11:02

Re: [L4D & L4D2] Incapped Weapons Patch (1.10) [10-May-2020]
 
Can i have a question?
What is the effect of using Health Items while incapped, it will help the survivors to standing up theirself? Or do nothing?

Silvers 07-11-2020 11:41

Re: [L4D & L4D2] Incapped Weapons Patch (1.10) [10-May-2020]
 
Quote:

Originally Posted by strikeraot (Post 2709674)
Can i have a question?
What is the effect of using Health Items while incapped, it will help the survivors to standing up theirself? Or do nothing?

I'm not sure that's even possible I don't think it triggers the animation, or at least for first aid, pills might trigger the animation but doesn't actually do anything.. I can't remember anymore. Suggest not allowing meds to be used. Another plugin would have to be written to enable whatever features for these while incapped.

rekcah 07-13-2020 01:07

Re: [L4D & L4D2] Incapped Weapons Patch (1.10) [10-May-2020]
 
Quote:

Originally Posted by Silvers (Post 2709687)
I'm not sure that's even possible I don't think it triggers the animation, or at least for first aid, pills might trigger the animation but doesn't actually do anything.. I can't remember anymore. Suggest not allowing meds to be used. Another plugin would have to be written to enable whatever features for these while incapped.

One of my players told me using adren/pills while incapped crashes the server, ill test it myself soon.

AlexAlcala 07-31-2020 16:02

Re: [L4D & L4D2] Incapped Weapons Patch (1.10) [10-May-2020]
 
there is an error with "respawn automatic" I use the following plugin on an 8 player server, and when they revive they cannot grab objects: gasoline, soda, gnome.

I use this plugin:

https://forums.alliedmods.net/showthread.php?p=2692361

Silvers 08-03-2020 17:38

Re: [L4D & L4D2] Incapped Weapons Patch (1.10) [10-May-2020]
 
Quote:

Originally Posted by rekcah (Post 2709920)
One of my players told me using adren/pills while incapped crashes the server, ill test it myself soon.

By default this is disabled because they provide no functionality when used and the item is not removed. Tested on windows and no crash. Needs another plugin or modification to detect usage while incapped and then possibly SDKCall or faking usage to trigger the effect of taking meds. Until something like that exists you should disable them.


Quote:

Originally Posted by AlexAlcala (Post 2712553)
there is an error with "respawn automatic" I use the following plugin on an 8 player server, and when they revive they cannot grab objects: gasoline, soda, gnome.

I use this plugin:

https://forums.alliedmods.net/showthread.php?p=2692361

As you said that's a problem with that plugin and not this, I have no issue using/grabbing objects after incap, even tried with that plugin and have no issue so you possibly have some other plugin conflict.

Tonblader 10-24-2020 17:20

Re: [L4D & L4D2] Incapped Weapons Patch (1.10) [10-May-2020]
 
Spoiler


Edit:
No, this plugin is not the one that causes this problem, I already deactivated it and the problem persists.

HarryPotter 11-08-2020 09:25

Re: [L4D & L4D2] Incapped Weapons Patch (1.10) [10-May-2020]
 
Report bug, if you incap and then switch team to infected,
can't use M2 attack

szatan 11-09-2020 04:21

Re: [L4D & L4D2] Incapped Weapons Patch (1.10) [10-May-2020]
 
Howdy there partners!
I'm looking for help or guidance. I'd like to use this plugin in a different way than it's intended.
Instead of balls out unlocking all weapons, I'd like it to only change all melee weapons to a magnum pistol when incapacitated.
Could anybody help me make appropriate changes to the code?
I am not that much of a coder person myself.

cravenge 11-09-2020 05:25

Re: [L4D & L4D2] Incapped Weapons Patch (1.10) [10-May-2020]
 
Quote:

Originally Posted by szatan (Post 2724328)
[...]

This plugin covers that: [L4D2] Incapped Magnum

szatan 11-09-2020 07:27

Re: [L4D & L4D2] Incapped Weapons Patch (1.10) [10-May-2020]
 
Quote:

Originally Posted by cravenge (Post 2724333)
This plugin covers that: [L4D2] Incapped Magnum

You immediately assumed I didn't know how to use the search option, and that's understandable.
Well, my dear sir, that plugin over there, the Incapped Magnum, is full of bugs, sometimes it gives a player the magnum, sometimes the player's weapon disappears and they are left empty handed on the floor.
I can't imagine a way to fix that plugin, it's an old one that wasn't updated in years I'd say.
That's why I'm looking for a different plugin tampering with the weapons on the ground, more up to date so to speak. One that would guarantee other players won't have to suffer the fate of laying on the ground unarmed.

Also, Incapped Weapons has a problem with Chainsaws. I disabled Chainsaws and all weapons on the ground, except melees and pistols. When a player gets incapacitated with a chainsaw at their disposal, they can use whichever weapon they held before going down. Be it any rifle or shotgun or said chainsaw. No matter that those weapons are restricted in my cfg.

cravenge 11-09-2020 09:26

Re: [L4D & L4D2] Incapped Weapons Patch (1.10) [10-May-2020]
 
Quote:

Originally Posted by szatan (Post 2724345)
You immediately assumed I didn't know how to use the search option, and that's understandable.

I didn't even made any assumption. I just guided you to the plugin if it was what you wanted.

Silvers 02-15-2021 20:43

Re: [L4D & L4D2] Incapped Weapons Patch (1.10) [10-May-2020]
 
Quote:

Originally Posted by HarryPotter (Post 2724213)
Report bug, if you incap and then switch team to infected,
can't use M2 attack

Thanks should be fixed in latest update.



All other features requested someone else can write, I don't have time. Working defib or pills will take some effort to script and make bug free.

Mystik Spiral 03-05-2021 10:04

Re: [L4D & L4D2] Incapped Weapons Patch (1.11) [15-Feb-2021]
 
While incapped, all weapons behave as expected against infected. However, only the melee weapon does friendly-fire against other players, the primary weapon and pistols/magnum do not.

I suggest that melee weapons should not cause friendly-fire when incapped to match the behavior of pistols/magnum and primary weapon.

Update: I'm sure there are many ways to do this, but one way would be in your Event_Incapped function to hook SDKHook_OnTakeDamage (unhook as appropriate when player not incapped), then in OnTakeDamage function check for melee weapon (and victim/attacker are both valid and survivor) and return Plugin_Handled if true. Chances are you know a better way to do this...just trying to help if possible.

Silvers 03-05-2021 10:58

Re: [L4D & L4D2] Incapped Weapons Patch (1.11) [15-Feb-2021]
 
Thanks, will update at some point. Don't have time for a while.

Mystik Spiral 03-05-2021 11:19

Re: [L4D & L4D2] Incapped Weapons Patch (1.11) [15-Feb-2021]
 
Quote:

Originally Posted by Silvers (Post 2739377)
Thanks, will update at some point. Don't have time for a while.

No worries, I completely understand. In the meantime, I have released a new version of my Reverse Friendly-Fire plugin with a new ConVar (reverseff_attackerincapped) to specifically deal with this issue...if set to false it blocks friendly-fire if the attacker is incapped.

Silvers 03-08-2021 06:34

Re: [L4D & L4D2] Incapped Weapons Patch (1.12) [08-Mar-2021]
 
Done!

Code:

1.12 (08-Mar-2021)
    - Added cvar "l4d_incapped_weapons_melee" to control Melee weapon damage to Survivors. Thanks to "Mystik Spiral" for reporting.


ETNKOREA 04-20-2021 20:43

Re: [L4D & L4D2] Incapped Weapons Patch (1.12) [08-Mar-2021]
 
I want to make it impossible to use melee weapons.

Silvers 04-21-2021 05:25

Re: [L4D & L4D2] Incapped Weapons Patch (1.12) [08-Mar-2021]
 
Quote:

Originally Posted by ETNKOREA (Post 2744670)
I want to make it impossible to use melee weapons.

See the cvars listed in 1st post.

Dragokas 06-16-2021 09:03

Re: [L4D & L4D2] Incapped Weapons Patch (1.12) [08-Mar-2021]
 
Offsets in 2.2.1.3 are changed (checked Linux only).
I also added more informative error msgs.

Edit by Silvers, removed attachments, included in first post.

Silvers 06-16-2021 09:35

Re: [L4D & L4D2] Incapped Weapons Patch (1.13) [16-Jun-2021]
 
Quote:

Originally Posted by Dragokas (Post 2749965)
Offsets in 2.2.1.3 are changed (checked Linux only).
I also added more informative error msgs.

Thanks, updated.

Psyk0tik 07-08-2021 13:24

Re: [L4D & L4D2] Incapped Weapons Patch (1.13) [16-Jun-2021]
 
The Linux offset for "CanDeploy_Offset" changed with today's update:
PHP Code:

"CanDeploy_Offset"
{
    
"windows"        "18"
    "linux"            "20" 
// was 19



Silvers 07-08-2021 14:57

Re: [L4D & L4D2] Incapped Weapons Patch (1.13) [16-Jun-2021]
 
Uploading this here until I can verify the gamedata is correct.

@Crasher_3637 seems more than just 1 offset changed.


Updated GameData in first post.

Psyk0tik 07-08-2021 15:40

Re: [L4D & L4D2] Incapped Weapons Patch (1.13) [16-Jun-2021]
 
Quote:

Originally Posted by Silvers (Post 2752226)
Uploading this here until I can verify the gamedata is correct.

@Crasher_3637 seems more than just 1 offset changed.

Yes, I only took care of the one that was causing an error. I've looked at your new offset for "OnIncap_Offset" and verified that it's correct.

Tonblader 07-30-2021 14:03

Re: [L4D & L4D2] Incapped Weapons Patch (1.13a) [09-Jul-2021]
 
Is it possible to use the pill and adrenaline while you are incapacitated?
that the pills can cure you 200 of temporary life (cvar)
that adrenaline can heal you 50 of temporary life (cvar), it allows you to crawl more faster (cvar), it allows you to push doors/buttons of any kind and that it allows you to rescue survivors from the closet, to reload the weapons faster and the melees more fast (cvar to activate / deactivate) and last 20 seconds for example (cvar).

Edit:
When i try take gascan,colabottles with [L4D2] Weapon Drop xZk version the object is automatically thrown and I do not catch it.
And with [L4D2] Healing Cola when i try take colabottles, I can't take the object because it is also thrown and in turn the healing field stays in me as if I had the colabottles in my hands.

gabuch2 11-11-2022 20:10

Re: [L4D & L4D2] Incapped Weapons Patch (1.13a) [09-Jul-2021]
 
This is great. Any news on the animation for throwables?

Silvers 11-12-2022 06:02

Re: [L4D & L4D2] Incapped Weapons Patch (1.13a) [09-Jul-2021]
 
Quote:

Originally Posted by gabuch2 (Post 2792612)
This is great. Any news on the animation for throwables?

Well the player animation stands up when throwing and viewed in 3rd person. The only thing that could be done is optionally using left4dhooks to block the stand up animation then there would be no throwing animation in 3rd person view. Doesn't appear possible to play the throwing animation whilst incapped without the player standing up. I could add this as a cvar to block the animation if left4dhooks is detected.

Code:

1.14 (12-Nov-2022)
    - Added cvar "l4d_incapped_weapons_throw" to optionally prevent the standing up animation when throwing grenades.
    - Now optionally uses "Left4DHooks" plugin to prevent standing up animation when throwing grenades.



All times are GMT -4. The time now is 17:02.

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