AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D1 & L4D2] Incapped Pills Pop (https://forums.alliedmods.net/showthread.php?t=332094)

Dragokas 04-22-2021 18:40

[L4D1 & L4D2] Incapped Pills Pop
 
1 Attachment(s)
Description:
Allows you to self-help (stand up) while:
  • incapacitated
  • hanging the ledge
  • captured by special infected
by pop the pills / adrenaline / medkit using one of the selected buttons: (JUMP), (CROUCH) or (USE).
Settings (ConVars):
Located at /cfg/sourcemod/l4d_incappedpillspop2.cfg
PHP Code:

// Enable this plugin? (1 - Yes, 0 - No)
l4d_incappedpillspop_enable "1"

// How long before an Incapped Survivor can use pills/adrenaline
l4d_incappedpillspop_delaytime "0.2"

// Forbid self-help when somebody reviving you (1 - Yes / 0 - No)
l4d_incappedpillspop_forbid_when_reviving "1"

// Disable heartbeat sound in game at all (1 - Disable / 0 - Do nothing)
l4d_disable_heartbeat "0"

// Show message to all about player selfhelp action (1 - Yes / 0 - No)
l4d_incappedpillspop_show_msg_all "1"

// Position of the selfhelp action message (0 - Don't show, 1 - Chat, 2 - Hint, 4 - Center screen (can be combined)
l4d_incappedpillspop_msg_pos "1"

// Position of advertise selfhelp keys message (0 - Don't show, 1 - Chat, 2 - Hint, 4 - Center screen (can be combined)
l4d_incappedpillspop_msgadvert_pos "1"

// Show warning messages, e.g. when you have no pills? (0 - No, 1 - Yes)
l4d_incappedpillspop_msg_warn "1"

// What button to press for self-help? 2 - Jump, 4 - Duck, 32 - Use. You can combine.
l4d_incappedpillspop_button "32"

// Allow to pop with these items from incap (0 - Don't allow, 1 - Medkit, 2 - Pills, 4 - Adrenaline (can be combined)
l4d_incappedpillspop_help_items "7"

// Allow to pop with these items from hangind the ledge (0 - Don't allow, 1 - Medkit, 2 - Pills, 4 - Adrenaline (can be combined)
l4d_incappedpillspop_help_ledge_items "7"

// Allow to release from infected with these items (0 - Don't allow, 1 - Medkit, 2 - Pills, 4 - Adrenaline (can be combined)
l4d_incappedpillspop_release_items "7" 

Requirements:
- SourceMod 1.10+
- DHook Detours Extension or SourceMod 1.11.0.6820+
- [L4D & L4D2] Heartbeat (Revive Fix - Post Revive Options) by Silvers
Translations
- English
- Russian
- Portuguese (thanks to @King_OXO)
- Chinese (thanks to @HarryPotter)
Compatibility
- L4D1
- L4D2
Credits:
- AtomicStryker - for the original idea and his plugin which was a basis for the very first fork.
- Pan XiaoHai - for some vector code snippets.
- Peace-Maker - for his DHook with detours support.
- Voevoda - for donation.
Related plugins:
- [L4D1] Health Exploit Fix by Dragokas
- [L4D1 & L4D2] Ledge Release by Dragokas
- [L4D, L4D2] No Death Check Until Dead by chinagreenelvis
ChangeLog
Spoiler


Donate
Donates are very appreciated and welcomed for further inspiration, make me happy, and make next updates came out more often:
- Patreon (Paypal)
- BitCoin
- Ю.Money
P.S.:
- Project and updates discontinued. Don't ask.

Dragokas 04-22-2021 18:46

Re: [L4D1 & L4D2] Incapped Pills Pop
 
Latest changes:

Quote:

2.0 (23-Apr-2021)
- Improved music stop fix.
- Fixed bug: *_spawned classes: weapon_pain_pills_spawn and weapon_adrenaline_spawn are not checked on the floor.
- Improved bug-fix: other player could become frozen if you force pop pills while he tries to revive you.
- Prevented opportunity to use pills when been attacked by charger or jockey.
- Added missing ConVars for tracking the changes.
- Simplified & beautified the code, removed useless timers, Less useless hooks.
- Added ConVar "l4d_incappedpillspop_enable" - Enable this plugin? (1 - Yes, 0 - No).
- Added ConVar "l4d_incappedpillspop_button" - What button to press for self-help? 2 - Jump, 4 - Duck, 32 - Use. You can combine.
- Added ConVar "l4d_incappedpillspop_allow_adrenaline" - (L4D2 only) Allow pop adrenaline? (1 - Yes / 0 - No).
- Splitted messages:
* hint, when you incapacitated and when you hanging the ledge.
* hint, suggesting you to press the specific button to reflect the settings defined by ConVar.
* info, depending on whether somebody used his own pills or found them on the floor.
- New requirements:
* SourceMod 1.10+
* DHooks Detours v.2.2.0.15+
To make this update works properly, be sure to update the following plugins to the latest version (if you use them):
* Health Exploit Fix (for L4D1): https://forums.alliedmods.net/showthread.php?t=314573
* Ledge Release: https://forums.alliedmods.net/showthread.php?t=316508

Dragokas 04-25-2021 14:14

Re: [L4D1 & L4D2] Incapped Pills Pop
 
Updated.

Quote:

2.1 (25-Apr-2021)
- Fixed "l4d_incappedpillspop_enable" ConVar is not worked.

Voevoda 05-10-2021 12:24

Re: [L4D1 & L4D2] Incapped Pills Pop
 
Hello, you can add a first aid kit

Dragokas 05-11-2021 10:51

Re: [L4D1 & L4D2] Incapped Pills Pop
 
Maybe, but not for free. It requires a lot of changes.

Sev 05-11-2021 11:38

Re: [L4D1 & L4D2] Incapped Pills Pop
 
Would be useful for bots.

Dragokas 05-29-2021 13:54

Re: [L4D1 & L4D2] Incapped Pills Pop
 
Updated.

Quote:

2.2 (11-May-2021)
- Added ability to use medkit (thanks to @Voevoda for donation).
- Added new ConVar "l4d_incappedpillspop_allow_medkit" - Allow stand-up with first aid kit? (1 - Yes / 0 - No)
- Added new ConVar "l4d_incappedpillspop_allow_pills" - Allow pop pills? (1 - Yes / 0 - No)
- Translation file is updated.

little_froy 05-29-2021 14:08

Re: [L4D1 & L4D2] Incapped Pills Pop
 
more reasonable and more pure than my Incapacitated Automatic Regeneration and self Revive.
i try to enhance survivals a lot, but still always lose in versus

jking 05-29-2021 14:29

Re: [L4D1 & L4D2] Incapped Pills Pop
 
Dragokas, this works fantastic but I noticed this error below (reproducible) though doesn't affect functionality:

Code:

L 05/29/2021 - 12:25:55: SourceMod error session started
L 05/29/2021 - 12:25:55: Info (map "c5m1_waterfront") (file "C:\L4D2\left4dead2\addons\sourcemod\logs\errors_20210529.log")
L 05/29/2021 - 12:25:55: [SM] Exception reported: Language phrase "NoPillsAdrenaline" not found (arg 4)
L 05/29/2021 - 12:25:55: [SM] Blaming: l4d_incappedpillspop.smx
L 05/29/2021 - 12:25:55: [SM] Call stack trace:
L 05/29/2021 - 12:25:55: [SM]  [0] VFormat
L 05/29/2021 - 12:25:55: [SM]  [1] Line 731, l4d_incappedpillspop.sp::CPrintToChat
L 05/29/2021 - 12:25:55: [SM]  [2] Line 609, l4d_incappedpillspop.sp::Timer_AdvertisePills


Dragokas 05-29-2021 16:16

Re: [L4D1 & L4D2] Incapped Pills Pop
 
Thanks. I didn't test the latest update. I'll fix that tomorrow.


All times are GMT -4. The time now is 10:55.

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