Raised This Month: $32 Target: $400
 8% 

[L4D2] Stripper help with deleting defibs


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mr. Man
Veteran Member
Join Date: Mar 2011
Location: Huh?
Old 07-01-2022 , 19:00   [L4D2] Stripper help with deleting defibs
Reply With Quote #1

Hi, got this Stripper code to remove all defibs from all maps but they are still spawning. Appreciate all insights:

Code:
; --- Remove defibrillators
modify:
{
	match:
	{
		"classname" "weapon_item_spawn"
	}
	replace:
	{
		"item12" "0"
	}
}
filter:
{
	"classname" "weapon_defibrillator_spawn"
}
{
	"classname" "weapon_defibrillator"
}
__________________
Mr. Man is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 07-01-2022 , 19:12   Re: [L4D2] Stripper help with deleting defibs
Reply With Quote #2

Better give more info like which map etc
Also some stuff is converted during mid game.
Try changing some cvars like:

director_convert_pills_to_defib_health 0
__________________
Marttt is offline
Austin
Senior Member
Join Date: Oct 2005
Old 07-02-2022 , 11:04   Re: [L4D2] Stripper help with deleting defibs
Reply With Quote #3

Your stripper filter rules look good and I tested they do work,
(not sure what you are doing with the replace rule)
but stripper only runs once at map start so it will only remove items at map start.
The director gets involved and spawns them during the map.

I had already written a plugin to remove all meele weapons so I just modified it to only remove defibs.
It removes all defibs at map start and then checks every 20 seconds and
if it finds more it removes them even the ones players are carrying.

This will get rid of all of them "for good"!

With this plugin you don't need thoses stripper rules either.

Enjoy.
Attached Files
File Type: sp Get Plugin or Get Source (ABS_ReallyRemoveItems.sp - 71 views - 900 Bytes)

Last edited by Austin; 07-02-2022 at 11:12.
Austin is offline
Mr. Man
Veteran Member
Join Date: Mar 2011
Location: Huh?
Old 07-02-2022 , 11:20   Re: [L4D2] Stripper help with deleting defibs
Reply With Quote #4

Thanks all!
__________________
Mr. Man is offline
Austin
Senior Member
Join Date: Oct 2005
Old 07-03-2022 , 14:47   Re: [L4D2] Stripper help with deleting defibs
Reply With Quote #5

Quote:
Originally Posted by Mr. Man View Post
Thanks all!
Now could you do me a favor?

1) Click the edit button on your original post.
2) In the edit screen lower right click the Go Advanced button
3) Upper left under title select Solved!

Did you get it working as expected?
Austin is offline
Mr. Man
Veteran Member
Join Date: Mar 2011
Location: Huh?
Old 07-05-2022 , 22:16   Re: [L4D2] Stripper help with deleting defibs
Reply With Quote #6

Quote:
Originally Posted by Austin View Post
Now could you do me a favor?

1) Click the edit button on your original post.
2) In the edit screen lower right click the Go Advanced button
3) Upper left under title select Solved!

Did you get it working as expected?
Not yet, I am playing with some CVARs to avoid having to run a plugin to manage this but they seem to be spawning still.
__________________
Mr. Man is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 07-06-2022 , 09:21   Re: [L4D2] Stripper help with deleting defibs
Reply With Quote #7

Could you tell the map and the spot where it occurs?
__________________
Marttt is offline
moschinovac
Member
Join Date: Mar 2019
Location: Vietnam
Old 07-07-2022 , 13:37   Re: [L4D2] Stripper help with deleting defibs
Reply With Quote #8

Faster way is use Vscript then the item will remove from map…
moschinovac is offline
Austin
Senior Member
Join Date: Oct 2005
Old 07-07-2022 , 19:54   Re: [L4D2] Stripper help with deleting defibs
Reply With Quote #9

Quote:
Originally Posted by Mr. Man View Post
Not yet, I am playing with some CVARs to avoid having to run a plugin to manage this but they seem to be spawning still.
Quote:
Originally Posted by moschinovac View Post
Faster way is use Vscript then the item will remove from map…
Thanks for pointing us in this direction....

I found this bit of interesting information on VScripts used to removed the auto spawned defibs.
https://forums.alliedmods.net/showthread.php?t=332508
Thanks go to GoGetSomeSleep.

I tested the attached VScript file and it does remove the auto spawned defibs.
I do not know if it will keep the ones the director spawns from appearing.
If it doesn't then this isn't any better then your stripper rules.

I am going to remain positive and say there is a 90% chance this will also keep the director from directly spawning defibs too and you will finally have what you are looking for.

Let us know if it works for you....

Put the attached file in this folder.
create the folder if it doesn't exists.
..\left4dead2\scripts\vscripts\coop.nut

If you also want this for versus then make a copy and name it.
..\left4dead2\scripts\vscripts\versus.nut

You will still need your stripper rules since this VScript doesn’t affect any defib entities that are placed in the map to start with.

Any reason why we can't upload .nut files?
Attached Files
File Type: zip coop.nut.zip (334 Bytes, 21 views)

Last edited by Austin; 07-07-2022 at 22:31.
Austin is offline
moschinovac
Member
Join Date: Mar 2019
Location: Vietnam
Old 07-07-2022 , 23:49   Re: [L4D2] Stripper help with deleting defibs
Reply With Quote #10

Code:
MutationOptions <- 
{
	// remove defibs auto spawns
	weaponsToRemove =
	{
		weapon_defibrillator = 0
	}

	function AllowWeaponSpawn( classname )
	{
		if ( classname in weaponsToRemove )
		{
			return false;
		}
		return true;
	}

	function ShouldAvoidItem( classname )
	{
		if ( classname in weaponsToRemove )
		{
			return true;
		}
		return false;
	}
}
if u want convert defib to pills or something

Code:
MutationOptions <- 
{
        weaponsToConvert =
	{
		weapon_defibrillator = "weapon_pain_pills_spawn"
	}

	function ConvertWeaponSpawn( classname )
	{
		if ( classname in weaponsToConvert )
		{
			return weaponsToConvert[classname];
		}
		return 0;
	}
}

Last edited by moschinovac; 07-08-2022 at 04:48.
moschinovac 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 04:48.


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