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

{L4D2} Defibs in saferoom request


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kitsune1991
Junior Member
Join Date: Sep 2022
Old 09-12-2022 , 00:47   {L4D2} Defibs in saferoom request
Reply With Quote #1

Good Evening, y'all. I'm hoping someone could help me out. I'm trying to find a plugin that simply replaces safe room medkits with defibs. However, every plugin I've found either doesn't work or makes way too many changes I don't want. After playing the Shock Therapy campaign mutation, I didn't like the fact it coverts all medkits to defibs. Could I ask a kind soul to replicate this but only in the safe room and starting points of campaigns?
Kitsune1991 is offline
alasfourom
Senior Member
Join Date: Feb 2022
Location: Saudi Arabia
Old 09-12-2022 , 01:28   Re: {L4D2} Defibs in saferoom request
Reply With Quote #2

Try using this plugin, check last post by me with the updated version
https://forums.alliedmods.net/showth...=113444&page=4

Then change this cvar l4d_no_saferoom_medkits_change, to:
PHP Code:
 l4d_no_saferoom_medkits_change "weapon_defibrillator_spawn" 
__________________
alasfourom is offline
Kitsune1991
Junior Member
Join Date: Sep 2022
Old 09-12-2022 , 01:56   Re: {L4D2} Defibs in saferoom request
Reply With Quote #3

Quote:
Originally Posted by alasfourom View Post
Try using this plugin, check last post by me with the updated version
https://forums.alliedmods.net/showth...=113444&page=4

Then change this cvar l4d_no_saferoom_medkits_change, to:
PHP Code:
 l4d_no_saferoom_medkits_change "weapon_defibrillator_spawn" 
I just tried your version of the mod on dead center. At the start of the campaign, it did what it was suppose to do. However chapter 2 onwards still have medkits in the safe room. Here's the bit I changed.

("l4d_no_saferoom_medkits_change", "weapon_defibrillator_spawn", "You Can Replace Med-Kits With Either [weapon_adrenaline_spawn] Or [weapon_pain_pills_spawn] While [Empty For No Items]", FCVAR_NOTIFY);
Kitsune1991 is offline
moschinovac
Member
Join Date: Mar 2019
Location: Vietnam
Old 09-12-2022 , 02:06   Re: {L4D2} Defibs in saferoom request
Reply With Quote #4

Quote:
Originally Posted by alasfourom View Post
Try using this plugin, check last post by me with the updated version
https://forums.alliedmods.net/showth...=113444&page=4

Then change this cvar l4d_no_saferoom_medkits_change, to:
PHP Code:
 l4d_no_saferoom_medkits_change "weapon_defibrillator_spawn" 
End of map (mean start saferoom of next map) still count as current map too so if ppl go in there then take medkit. That will not replace medkit to defib tho~. Your plugins only detect medkit at start saferoom, not end saferoom. Use method detect Last Saferoom door of l4dhooks may works.

Last edited by moschinovac; 09-12-2022 at 02:07.
moschinovac is offline
alasfourom
Senior Member
Join Date: Feb 2022
Location: Saudi Arabia
Old 09-12-2022 , 02:50   Re: {L4D2} Defibs in saferoom request
Reply With Quote #5

No cvars, just drop the smx file in the plugins folder
Attached Files
File Type: sp Get Plugin or Get Source (L4D_NoSafeRoomMedKits.sp - 43 views - 3.2 KB)
__________________
alasfourom is offline
Kitsune1991
Junior Member
Join Date: Sep 2022
Old 09-12-2022 , 03:33   Re: {L4D2} Defibs in saferoom request
Reply With Quote #6

Quote:
Originally Posted by alasfourom View Post
No cvars, just drop the smx file in the plugins folder
Well it sorta worked. But what moschinovac said rang true as far as end of map medkits are concerned. Dead Center's Hotel chapter had defibs at start, medkits at the end with said medkits converting to defibs upon Streets map loaded. By this point all the bots were able to grab a medkit before they shut the door. Thank you for your efforts thus far. I'm goin' to sleep now as its roughly 30 AM where I am, so Goodnight y'all. I actually got lost trying to learn how to learn in the tutorial section.
Kitsune1991 is offline
alasfourom
Senior Member
Join Date: Feb 2022
Location: Saudi Arabia
Old 09-12-2022 , 03:42   Re: {L4D2} Defibs in saferoom request
Reply With Quote #7

It’s because I added 2.0 seconds delay to replace the medkits, this is why Bots are able to get the medkits but should be replaced to defibs. Anyway I will rewrite it later with an improved version, and start it with “OnEntityCreated” instead of OnMapStart with a delay
__________________

Last edited by alasfourom; 09-12-2022 at 03:45.
alasfourom is offline
alasfourom
Senior Member
Join Date: Feb 2022
Location: Saudi Arabia
Old 09-12-2022 , 08:16   Re: {L4D2} Defibs in saferoom request
Reply With Quote #8

Works fine for versus, I don't know about other modes

Remove old plugin + cfg file
Attached Files
File Type: sp Get Plugin or Get Source (L4D_NoSafeRoomMedKits.sp - 42 views - 4.6 KB)
__________________

Last edited by alasfourom; 09-12-2022 at 08:16.
alasfourom is offline
Kitsune1991
Junior Member
Join Date: Sep 2022
Old 09-12-2022 , 15:14   Re: {L4D2} Defibs in saferoom request
Reply With Quote #9

Quote:
Originally Posted by alasfourom View Post
Works fine for versus, I don't know about other modes

Remove old plugin + cfg file
Well, I just tried this. Sorry but there was no change on campaign/coop.
Kitsune1991 is offline
Kitsune1991
Junior Member
Join Date: Sep 2022
Old 09-13-2022 , 15:45   Re: {L4D2} Defibs in saferoom request
Reply With Quote #10

Solved. Mod was already made.
https://forums.alliedmods.net/showpo...8&postcount=91
Kitsune1991 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 06:40.


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