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

L4D2 how do I remove chainsaw or object on all maps


Post New Thread Reply   
 
Thread Tools Display Modes
JLmelenchon
Senior Member
Join Date: Mar 2019
Old 11-16-2020 , 04:24   Re: L4D2 how do I remove chainsaw or object on all maps
Reply With Quote #11

Something like that if i want to replace these 3 rifles by this one ?

Code:
modify:
{
	match:
	{
		"weapon_selection" "weapon_sniper_awp"
		"weapon_selection" "weapon_sniper_scout"
		"weapon_selection" "weapon_sniper_military"
		
	}
	replace:
	{
		"weapon_selection" "weapon_hunting_rifle"
	}
}

modify:
{
	match:
	{
		"classname" "weapon_sniper_awp_spawn"
		"classname" "weapon_sniper_scout_spawn"
		"classname" "weapon_sniper_military_spawn"
		
	}
	replace:
	{
		"classname" "weapon_hunting_rifle_spawn"
	}
}

Last edited by DarkDeviL; 11-20-2020 at 04:16. Reason: Changed from QUOTE to CODE tags
JLmelenchon is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 11-16-2020 , 14:47   Re: L4D2 how do I remove chainsaw or object on all maps
Reply With Quote #12

Nope, I think Stripper doesn't work that way,
You have to create a separate line as I did.
__________________
Marttt is offline
JLmelenchon
Senior Member
Join Date: Mar 2019
Old 11-17-2020 , 07:44   Re: L4D2 how do I remove chainsaw or object on all maps
Reply With Quote #13

Tested on a few maps and it seems you were right so i will try line by line.

Code:
modify:
{
	match:
	{
		"weapon_selection" "weapon_sniper_awp"
		"weapon_selection" "weapon_sniper_scout"
		"weapon_selection" "weapon_sniper_military"
		
	}
	replace:
	{
		"weapon_selection" "weapon_hunting_rifle"
	}
}

modify:
{
	match:
	{
		"classname" "weapon_sniper_awp_spawn"
		"classname" "weapon_sniper_scout_spawn"
		"classname" "weapon_sniper_military_spawn"
		
	}
	replace:
	{
		"classname" "weapon_hunting_rifle_spawn"
	}
}

modify:	
{
	match:
	{
		"weapon_selection" "any_sniper_rifle"
	}
	replace:
	{
		"weapon_selection" "weapon_hunting_rifle"
	}
}

Last edited by DarkDeviL; 11-20-2020 at 04:16. Reason: Changed from QUOTE to CODE tags
JLmelenchon is offline
JLmelenchon
Senior Member
Join Date: Mar 2019
Old 11-17-2020 , 19:20   Re: L4D2 how do I remove chainsaw or object on all maps
Reply With Quote #14

Well i managed to crash my server, as i am not sure what to put i guess i did a mistake.

If anyone can say me what i have to write exactly to delete these sniper that will be nice.

weapon_sniper_awp_spawn
weapon_sniper_scout_spawn
weapon_sniper_military_spawn
JLmelenchon is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 11-17-2020 , 19:40   Re: L4D2 how do I remove chainsaw or object on all maps
Reply With Quote #15

Did you tried my code? As I said the syntax you paste here doesn't work for stripper
You can have only a single "weapon_selection" by match tag, not multiples.
__________________

Last edited by Marttt; 11-17-2020 at 19:40.
Marttt is offline
JLmelenchon
Senior Member
Join Date: Mar 2019
Old 11-18-2020 , 05:48   Re: L4D2 how do I remove chainsaw or object on all maps
Reply With Quote #16

Quote:
Originally Posted by Marttt View Post
Did you tried my code? As I said the syntax you paste here doesn't work for stripper
You can have only a single "weapon_selection" by match tag, not multiples.
Yes i did it with only one line for each.
JLmelenchon is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 11-18-2020 , 08:40   Re: L4D2 how do I remove chainsaw or object on all maps
Reply With Quote #17

Share your file so I can test here to check if crashes too
And which map is crashing? All?
__________________
Marttt is offline
JLmelenchon
Senior Member
Join Date: Mar 2019
Old 11-18-2020 , 12:13   Re: L4D2 how do I remove chainsaw or object on all maps
Reply With Quote #18

Server was restarting non stop.

Code:
modify:
{
	match:
	{
		"weapon_selection" "weapon_sniper_awp"
	}
	replace:
	{
		"weapon_selection" "weapon_hunting_rifle"
	}
}

modify:
{
	match:
	{
		"weapon_selection" "weapon_sniper_scout"
	}
	replace:
	{
		"weapon_selection" "weapon_hunting_rifle"
	}
}

modify:
{
	match:
	{
		"weapon_selection" "weapon_sniper_military"
	}
	replace:
	{
		"weapon_selection" "weapon_hunting_rifle"
	}
}

modify:	
{
	match:
	{
		"weapon_selection" "any_sniper_rifle"
	}
	replace:
	{
		"weapon_selection" "weapon_hunting_rifle"
	}
}

modify:
{
	match:
	{
		"classname" "weapon_sniper_awp_spawn"
	}
	replace:
	{
		"classname" "weapon_hunting_rifle_spawn"
	}
}

modify:
{
	{
		"classname" "weapon_sniper_scout_spawn"
	}
	replace:
	{
		"classname" "weapon_hunting_rifle_spawn"
	}
}
	
modify:
{
	{	
		"classname" "weapon_sniper_military_spawn"
	}
	replace:
	{
		"classname" "weapon_hunting_rifle_spawn"
	}
}

Last edited by DarkDeviL; 11-20-2020 at 04:16. Reason: Changed from QUOTE to CODE tags
JLmelenchon is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 11-18-2020 , 19:50   Re: L4D2 how do I remove chainsaw or object on all maps
Reply With Quote #19

@JLmelenchon, keep focus. Read your config again.
__________________
Do not Private Message @me
Bacardi is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 11-19-2020 , 06:42   Re: L4D2 how do I remove chainsaw or object on all maps
Reply With Quote #20

You have 7 "modify", 7 "replaces" but only 5 "matches" which turns the script invalid.

The last two "modify" are missing the "match" tag.

Always indent the code to find issues like this easier.

Thanks Bacardi for reporting.


So here is what it should like in the end:

Spoiler


Or maybe more reduced (using regex):

Spoiler


I didn't test both.

Note: Creating an invalid stripper script crashes the server (confirmed)
Did happened with me once when I filtered a model in "remove" but forgot to add "model" at the beginning. (ex: remove: { "models/players/somemodel.dml" } ) = Crash
__________________
Marttt 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 03:49.


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