Raised This Month: $51 Target: $400
 12% 

[L4D & L4D2] Medkit Preventer


Post New Thread Reply   
 
Thread Tools Display Modes
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 09-17-2020 , 12:38   Re: [L4D & L4D2] Medkit Preventer
Reply With Quote #21

I have an alternative version I never released because I hadn't tested it much. I sent to a few people and apparently it's working. It patches the health value the bots check before trying to heal or use pills/adrenaline and prevents them standing there holding a medkit trying to heal someone. If anyones interested in testing PM me and I'll send.

Edit: seems L4D2 is Windows only, L4D1 linux should work. Not because of the detour but because of offsets and iirc the problem is reading the address from a LEA, if someone can figure how to read the address from this it *might* work but it's not something I wanted to waste more time on.

Edit2: Released a fully working plugin: Bot Healing Values
__________________

Last edited by Silvers; 09-25-2023 at 03:08.
Silvers is offline
xerox8521
Senior Member
Join Date: Sep 2011
Old 09-25-2020 , 06:09   Re: [L4D & L4D2] Medkit Preventer
Reply With Quote #22

Updated L4D2 Gamedata.

- Stop the server.
- Download from the first post and replace the old one.
- Start the server.

Last edited by xerox8521; 09-25-2020 at 06:12.
xerox8521 is offline
kalmas77
Junior Member
Join Date: Sep 2021
Old 01-10-2022 , 12:31   Re: [L4D & L4D2] Medkit Preventer
Reply With Quote #23

Hi, Can you add an option to bots only? Please!
kalmas77 is offline
KadabraZz
Senior Member
Join Date: May 2020
Old 07-26-2022 , 03:24   Re: [L4D & L4D2] Medkit Preventer
Reply With Quote #24

I get multiple errors like this in the log, does anyone know why?

Code:
L 07/06/2022 - 23:17:56: [SM] Exception reported: Client index 265 is invalid
L 07/06/2022 - 23:17:56: [SM] Blaming: antimedkit.smx
L 07/06/2022 - 23:17:56: [SM] Call stack trace:
L 07/06/2022 - 23:17:56: [SM]   [0] GetClientHealth
L 07/06/2022 - 23:17:56: [SM]   [1] Line 154, antimedkit.sp::OnShouldStartAction

L 07/06/2022 - 23:17:51: [SM] Exception reported: Client index 264 is invalid
L 07/06/2022 - 23:17:51: [SM] Blaming: antimedkit.smx
L 07/06/2022 - 23:17:51: [SM] Call stack trace:
L 07/06/2022 - 23:17:51: [SM]   [0] GetClientHealth
L 07/06/2022 - 23:17:51: [SM]   [1] Line 154, antimedkit.sp::OnShouldStartAction

L 07/06/2022 - 22:41:40: [SM] Exception reported: Client index 327 is invalid
L 07/06/2022 - 22:41:40: [SM] Blaming: antimedkit.smx
L 07/06/2022 - 22:41:40: [SM] Call stack trace:
L 07/06/2022 - 22:41:40: [SM]   [0] GetClientHealth
L 07/06/2022 - 22:41:40: [SM]   [1] Line 154, antimedkit.sp::OnShouldStartAction
KadabraZz is offline
Sunyata
Senior Member
Join Date: Nov 2017
Location: Wherever I am
Old 11-24-2023 , 04:57   Force Bot to Holster Medkit for Anti-medkit Plugin
Reply With Quote #25

Quote:
Originally Posted by HarryPotter View Post
I set
PHP Code:
mkp_minhealth 5 
When I have health lower than 40, but higher than 5

The 3 other bots are trying to use kit on you and keep shoving XD
Kind of funny but a little annoying.
They don't focus on zombies when holding kits.


Is there any way to stop bots from thinking to use kit?
It might be a bit overdue, but I've created a 'quick fix' plugin to force a bot to reholster their medkit—this may not be the right approach to code this issue, but it sure gets the job done for the anti-medkit plugin!

I recently stumbled upon this solution while testing another plugin for a different purpose. While my code could benefit from some refinement, I'm sure a more experienced coder could further enhance it. It works very well for L4D1, but I haven't tested it for L4D2. Nevertheless, I thought it was worth sharing the script here—better late than never, I suppose.

EDIT: Plugin updated - in this update remember to adjust 'mkp_minhealth' in my script (mine is set to 25HP) to suit your own values for when bots do need to heal themselves. Anything above 25HP in this script will force bots to reholster their medkit.
Attached Files
File Type: sp Get Plugin or Get Source (Force-Bot-To-Holster-Medkit-Rev-5.sp - 35 views - 2.1 KB)

Last edited by Sunyata; 11-28-2023 at 06:18. Reason: plugin revision 2
Sunyata is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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