Raised This Month: $ Target: $400
 0% 

[L4D & L4D2] Health Vending Machines (1.12) [11-Dec-2022]


Post New Thread Reply   
 
Thread Tools Display Modes
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 04-29-2024 , 06:15   Re: [L4D & L4D2] Health Vending Machines (1.12) [11-Dec-2022]
Reply With Quote #61

Quote:
Originally Posted by DonProof View Post
It does not save the configuration in the maps, when restarting the server the vendors that I saved in data/l4d_vendor.cfg are not loaded
When placing a vendor and adjusting the position, after that I give it a save and when I restart the map they do not load or appear.
Does this plugin depend on another to work?
The plugin works fine, two possible reasons:

1. There is an issue with your server and saving to a config, maybe file or folder permissions, I don't know why some servers have these issues and I don't know how they get resolved.

2. Verify the config has been created and has data inside. If it does then maybe you have the cvar settings wrong, for example what is the value of this cvar:
PHP Code:
// -1=All, 0=None. Otherwise randomly select this many vendors to spawn from the maps config.
l4d_vendor_random "-1" 
__________________
Silvers is offline
DonProof
Junior Member
Join Date: Jun 2021
Old 05-03-2024 , 19:34   Re: [L4D & L4D2] Health Vending Machines (1.12) [11-Dec-2022]
Reply With Quote #62

Quote:
Originally Posted by Silvers View Post
The plugin works fine, two possible reasons:

1. There is an issue with your server and saving to a config, maybe file or folder permissions, I don't know why some servers have these issues and I don't know how they get resolved.

2. Verify the config has been created and has data inside. If it does then maybe you have the cvar settings wrong, for example what is the value of this cvar:
PHP Code:
// -1=All, 0=None. Otherwise randomly select this many vendors to spawn from the maps config.
l4d_vendor_random "-1" 
I have it configured like this in the source code

PHP Code:
"l4d_vendor_health_coffee",        "5",        "The health given to players when using the Coffee Machines (6)."CVAR_FLAGS );
"l4d_vendor_health_cooler",        "2",        "The health given to players when using the Water Coolers (1)."CVAR_FLAGS );
"l4d_vendor_health_drinks",        "7",        "The health given to players when using the Small Drink vendor (3)."CVAR_FLAGS );
"l4d_vendor_health_fountain",      "2",        "The health given to players when using the Water Fountains (2)."CVAR_FLAGS );
"l4d_vendor_health_snacks",        "5",        "The health given to players when using the Snack Vendors (5)."CVAR_FLAGS );
"l4d_vendor_health_vendor",        "4",        "The health given to players when using the Drink Vendors (4)."CVAR_FLAGS );
"l4d_vendor_max_coffee",           "10",       "0=Infinite. Maximum number of times a Coffee Machine can be used."CVAR_FLAGS );
"l4d_vendor_max_cooler",           "15",       "0=Infinite. Maximum number of times a Water Cooler can be used."CVAR_FLAGS );
"l4d_vendor_max_drinks",           "8",        "0=Infinite. Maximum number of times a Small Drink vendor can be used."CVAR_FLAGS );
"l4d_vendor_max_fountain",         "15",       "0=Infinite. Maximum number of times a Water Fountain can be used."CVAR_FLAGS );
"l4d_vendor_max_snacks",           "10",       "0=Infinite. Maximum number of times a Snack vendor can be used."CVAR_FLAGS );
"l4d_vendor_max_vendor",           "15",       "0=Infinite. Maximum number of times a Drink vendor can be used."CVAR_FLAGS );
"l4d_vendor_modes",                "versus",   "Turn on the plugin in these game modes, separate by commas (no spaces). (Empty = all)."CVAR_FLAGS );
"l4d_vendor_modes_off",            "",         "Turn off the plugin in these game modes, separate by commas (no spaces). (Empty = none)."CVAR_FLAGS );
"l4d_vendor_modes_tog",            "4",        "Turn on the plugin in these game modes. 0=All, 1=Coop, 2=Survival, 4=Versus, 8=Scavenge. Add numbers together."CVAR_FLAGS );
"l4d_vendor_random",               "-1",       "-1=All, 0=None. Otherwise randomly select this many vendors to spawn from the maps config."CVAR_FLAGS );
"l4d_vendor_temp",                 "25",       "-1=Add temporary health, 0=Add to normal health. Values between 1 and 100 creates a chance to give normal health."CVAR_FLAGS );
"l4d_vendor_timed",                "1.0",      "How many seconds it takes to use a vending machine."CVAR_FLAGStrue1.0true20.0 ); 
This is what is saved in data/l4d_vendor.cfg
And my question is, what value should the l4d_vendor_random convar have? I manually add the vendors and I want it to be saved there and not moved.

HTML Code:
"vendors"
{
	"c5m1_waterfront"
	{
		"num"		"2"
		"1"
		{
			"type"		"4"
			"angle"		"0.000000 90.000000 0.000000"
			"origin"		"-1651.544556 -1990.356323 -374.968750"
		}
		"2"
		{
			"type"		"3"
			"angle"		"0.000002 180.000000 0.000000"
			"origin"		"-3215.591797 -1124.890259 -318.670959"
		}
	}
	"c7m3_port"
	{
		"num"		"1"
		"1"
		{
			"type"		"4"
			"angle"		"0.000000 360.000000 0.000000"
			"origin"		"483.893188 -314.127808 160.031250"
		}
	}
	"c8m1_apartment"
	{
		"num"		"1"
		"1"
		{
			"type"		"4"
			"angle"		"0.000000 360.000000 0.000000"
			"origin"		"1894.329834 1370.929932 432.031250"
		}
	}
}
Last question, how many vendors can I put for each campaign chapter?
In the publication it says "32 Vendors" but it does not specify if it is per campaign chapter or the maximum number that can be had in data/l4d_vendor.cfg
DonProof is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 05-05-2024 , 15:35   Re: [L4D & L4D2] Health Vending Machines (1.12) [11-Dec-2022]
Reply With Quote #63

If you have to modify cvars in the source for the values to stick, you need Command Buffer Overflow Fixer plugin, it's in my signature.

All my spawner plugins that limit number of spawns, e.g. 32 max, means per map. Not total in config.

When you say manually save, you mean using the sm_vendorsave command?

I have no idea why it's not working for you, I don't have time to test your config, but it looks fine.

Do you use any other spawner plugins of mine and do they save/load?

If you figure out what's wrong, reply back and let us know.
__________________
Silvers 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 11:00.


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