View Single Post
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