sm_tree_spawn // Spawns a temporary Gift/Tree at your crosshair. Usage: sm_tree_spawn [type: 0=Gift. 1=Tree.]
sm_tree_save // Spawns a Gift/Tree at your crosshair and saves to config. Usage: sm_tree_save [type: 0=Gift. 1=Tree.]
sm_tree_del // Removes the Gift/Tree you are pointing at and deletes from the config if saved.
sm_tree_clear // Removes all Gifts/Trees spawned by this plugin from the current map.
sm_tree_wipe // Removes all Gifts/Trees from the current map and deletes them from the config.
sm_tree_reload // Resets the plugin and reloads the data config and saved spawns.
sm_tree_glow // Toggle to enable glow on all Gifts/Trees to see where they are placed.
sm_tree_list // Display a list Gift/Tree positions and the total number of.
sm_tree_tele // Teleport to a Gift/Tree (Usage: sm_tree_tele <index: 1 to MAX_SPAWNS (32)>).
sm_tree_ang // Displays a menu to adjust the Gift/Tree angles your crosshair is over.
sm_tree_pos // Displays a menu to adjust the Gift/Tree origin your crosshair is over.
CVars:
Saved to l4d_christmas_tree.cfg in your servers \cfg\sourcemod\ folder.
PHP Code:
l4d_tree_allow "1" // 0=Plugin off, 1=Plugin on.
l4d_tree_modes "" // Turn on the plugin in these game modes, separate by commas (no spaces). (Empty = all).
l4d_tree_modes_off "" // Turn off the plugin in these game modes, separate by commas (no spaces). (Empty = none).
l4d_tree_modes_tog "0" // Turn on the plugin in these game modes. 0=All, 1=Coop, 2=Survival, 4=Versus, 8=Scavenge. Add numbers together.
l4d_tree_ball_count "8" // How many balls to display per column.
l4d_tree_ball_columns "4" // How many columns of balls to display.
l4d_tree_ball_radius "45.0" // Distance from the tree base to display balls
l4d_tree_col_gift "255 0 0" // Gift color. 0=Off (default Gift color). Three values between 0-255 separated by spaces. RGB: Red Green Blue.
l4d_tree_col_tree "0 255 0" // Tree color. 0=Off (default Tree color). Three values between 0-255 separated by spaces. RGB: Red Green Blue.
l4d_tree_effects "31" // 0=Off. 1=Lights, 2=Balls, 4=Sparks, 8=Dissolver (gifts), 16=Smoke (gifts - may cause rare crash on servers), 31=All. Add numbers together.
l4d_tree_gifts "6" // How many packages to spawn under the tree.
l4d_tree_items "80,100,25,25,25,40,15,15,15,2,2,2,5,5,5,2,5,1,1,2,0,2,5,0,0,2,0,5,1,5" // Item chance. See above for details.
l4d_tree_melee "0,0,0,10,0,0,0,50,50,0,50,10,10" // Melee weapon chance - values must be comma separated: Axe, Baseball Bat, Cricket Bat, Crowbar, Frying Pan, Golf Club, Guitar, Katana, Machete, Nightstick, Knife, Pitchfork, Shovel.
l4d_tree_glow "255 0 0" // 0=Off. L4D2 only: glow outline on gifts. Three values between 0-255 separated by spaces. RGB: Red Green Blue.
l4d_tree_health "1" // 0=Does not break or drop items. Health of gifts before they can break and drop items.
l4d_tree_rainbow "2" // 0=Off. 1=Gifts change color over time. 2=Trees change color over time. 3=Both
l4d_tree_rate "10" // How fast the color changes when using rainbow option.
l4d_tree_speed "0.2" // How often to update the colors per second.
l4d_tree_version // Christmas Tree plugin version.
Changes:
Code:
1.9 (28-Jan-2024)
- Fixed memory leak caused by clearing StringMap/ArrayList data instead of deleting.
1.8 (30-Jul-2022)
- Changed cvar "l4d_tree_effects" to turn gifts smoke on or off. This may fix a random rare server crash. Thanks to "Hawkins" for reporting.
1.7 (06-Dec-2021)
- L4D2: Added cvar "l4d_tree_melee" to control melee type spawn chance. Requested by "CaRmilla".
- L4D2: Modified cvar "l4d_tree_items" adding an entry to the end for melee chance spawn.
- Changes to fix warnings when compiling on SourceMod 1.11.
1.6 (30-Sep-2020)
- Fixed compile errors on SM 1.11.
1.5 (10-May-2020)
- Blocked glow command from L4D1 which does not support glows.
- Extra checks to prevent "IsAllowedGameMode" throwing errors.
- Various changes to tidy up code.
1.4 (01-Apr-2020)
- Fixed "IsAllowedGameMode" from throwing errors when the "_tog" cvar was changed before MapStart.
1.3 (19-Dec-2019)
- Versus gamemodes now spawn the same items for both teams.
1.2 (07-Nov-2019)
- Fixed incorrect gamedata path not loading dissolve if available.
1.1 (07-Nov-2019)
- Fixed gamedata missing error.
- Fixed gifts spawning in the ground in L4D1.
1.0 (07-Nov-2019)
- Initial release.
Installation
Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.
Optionally download "l4d_christmas_tree.cfg" and save to your servers \addons\sourcemod\data\ folder. This has trees saved to every Valve map.
L 11/08/2019 - 02:23:57: SourceMod error session started
L 11/08/2019 - 02:23:57: Info (map "c5m1_waterfront_sndscape") (file "E:\1L4D2\left4dead2\addons\sourcemod\logs\er rors_20191108.log")
L 11/08/2019 - 02:23:57: [SM] Error parsing gameconfig file "E:\1L4D2\left4dead2\addons\sourcemod\gamedat a\l4d_dissolve_infected.txt":
L 11/08/2019 - 02:23:57: [SM] Error 1 on line 0, col 0: Stream failed to open
L 11/08/2019 - 02:23:57: [SM] Exception reported: Unable to open l4d_dissolve_infected: File could not be opened: 系统找不到指定的文件。
L 11/08/2019 - 02:23:57: [SM] Blaming: l4d_christmas_tree.smx
L 11/08/2019 - 02:23:57: [SM] Call stack trace:
L 11/08/2019 - 02:23:57: [SM] [0] LoadGameConfigFile
L 11/08/2019 - 02:23:57: [SM] [1] Line 195, E:\1L4D2\left4dead2\addons\sourcemod\scriptin g\l4d_christmas_tree.sp::OnPluginStart
L 11/08/2019 - 02:23:57: [SM] Unable to load plugin "l4d_christmas_tree.smx": Error detected in plugin startup (see error logs)
Nevermind. My friend found his problem he had unrelated to the plugin. Everything is working fine. Thank you for your contribution to these great games
Fun plugin! It's working great on my server, but I was wondering if you would be able to add an option that spawns the same gift items for each team in versus?
Fun plugin! It's working great on my server, but I was wondering if you would be able to add an option that spawns the same gift items for each team in versus?
Done.
Quote:
1.3 (19-Dec-2019)
- Versus gamemodes now spawn the same items for both teams.