AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D & L4D2] Plane Crash (1.11) [10-Jan-2023] (https://forums.alliedmods.net/showthread.php?t=181517)

Silvers 03-30-2012 06:46

[L4D & L4D2] Plane Crash (1.11) [10-Jan-2023]
 
15 Attachment(s)

About:
  • Set a time trigger with the command sm_plane_time to display a saved crash after round start. sm_plane_time 0 deletes the time trigger.
  • Using the sm_plane menu, a trigger can be saved, sized and positioned. The saved crash will show when survivors walk through this.
  • Can trigger a panic event a set number of seconds after the plane spawns with the cvar l4d_plane_crash_horde.
  • Hurts players if they are hit by debris. Set with the cvar l4d_plane_crash_damage, 0 turns off.
  • Auto-spawn config saved to: l4d_plane_crash.cfg in your servers \addons\sourcemod\data\ folder.


Admin Commands: (requires "z" flag)

PHP Code:

sm_plane          // Displays a menu with options to show/save a crash and triggers.
sm_plane_clear    // Clears crashes from the map (does not delete from the config).
sm_plane_time     // Sets the time after round start to show a saved crash. sm_plane_time 0 removes the time trigger. 


CVars:

Saved to l4d_plane_crash.cfg in your servers \left4dead\cfg\sourcemod\ folder.

PHP Code:

// 0=Plugin off, 1=Plugin on.
l4d_plane_crash_allow "1"

// The percentage chance of a saved plane crash being created from the saved config.
l4d_plane_crash_chance "100"

// 0=Spawn the plane in front of you (crashes to the left), 1=Spawn so the plane crashes in front of you.
l4d_plane_crash_angle "1"

// 0=Off, Remove the plane crash this many seconds after the plane hits the ground.
l4d_plane_crash_clear "0"

// 0=Off, Other value will hurt players if they get crushed by some debris.
l4d_plane_crash_damage "20"

// 0=Off, Trigger a panic event this many seconds after the plane spawns.
l4d_plane_crash_horde "24"

// Turn on the plugin in these game modes, separate by commas (no spaces). (Empty = all).
l4d_plane_crash_modes ""

// Turn off the plugin in these game modes, separate by commas (no spaces). (Empty = none).
l4d_plane_crash_modes_off ""

// Turn on the plugin in these game modes. 0=All, 1=Coop, 2=Survival, 4=Versus, 8=Scavenge. Add numbers together.
l4d_plane_crash_modes_tog "0"

// 0=Off, Otherwise creates a crash this many seconds after round start (triggers and custom map times override this cvar).
l4d_plane_crash_time "0"

// Plane Crash plugin version.
l4d_plane_crash_version 


Changes:
Code:

1.11 (10-Jan-2023)
    - Changed the method of calling a panic event to support some 3rd party maps with random director names. Thanks to "Qoo_" for reporting.
    - Fixed Temp crashes also spawning the saved crash. Spawning a temporary crash will prevent the trigger box from spawning a saved crash.

1.10 (20-Sep-2022)
    - Added cvar "l4d_plane_crash_chance" to set the chance of a plane crash being created, either saved or using the random cvar. Requested by "Sam B".

1.9 (04-Dec-2021)
    - Changes to fix warnings when compiling on SourceMod 1.11.

1.8 (19-Oct-2021)
    - Small changes to set the damage cvar value to all of the plugins damage entites (some had their own value).

1.7a (18-Sep-2021)
    - L4D2: Data config edited. Changed the position of the "c3m1_plankcountry" crash site.

1.7 (10-May-2020)
    - Extra checks to prevent "IsAllowedGameMode" throwing errors.
    - Various changes to tidy up code.

1.6 (01-Apr-2020)
    - Fixed "IsAllowedGameMode" from throwing errors when the "_tog" cvar was changed before MapStart.
    - Fixed not precaching "env_shake" which caused stutter on first explosion.

1.5 (05-May-2018)
    - Converted plugin source to the latest syntax utilizing methodmaps. Requires SourceMod 1.8 or newer.
    - Changed cvar "l4d_plane_crash_modes_tog" now supports L4D1.

1.4 (30-Jun-2012)
    - Added cvar "l4d_plane_crash_clear" to remove the plane crash after it stops moving.
    - Command "sm_crash" changed to "sm_plane".
    - Command "sm_crash_clear" changed to "sm_plane_clear".
    - Command "sm_crash_time" changed to "sm_plane_time".
    - Fixed the plane crash not being created when the server starts.

1.3 (10-May-2012)
    - Added "Show Saved Crash" and "Clear Crash" to the menu.

1.2 (01-Apr-2012)
    - Really fixed cvar "l4d_plane_crash_damage" not working.

1.1 (01-Apr-2012)
    - Added command "sm_crash_clear" to clear crashes from the map (does not delete from the config).
    - Added cvar "l4d_plane_crash_angle" to control if the plane spawns in front or crashes in front.
    - Fixed cvar "l4d_plane_crash_damage" not working.

1.0 (30-Mar-2012)
    - Initial release.


Installation:
  1. Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.
  2. L4D2: Optionally download "l4d_plane_crash.cfg" and save to your servers \addons\sourcemod\data\ folder. This has saved crashes and triggers on some Valve maps.

Updating from 1.9 or older:
  • New cvars have been added: use the Cvar Configs Updater, or delete the old cvars config or manually add them.

andre_sca 03-30-2012 07:11

Re: [L4D & L4D2] Plane Crash (1.0) [30-Mar-2012]
 
oh my god! it's amazing! how you guys can do those stuffs? i can't even make a color plugin :cry:
Amazing! download right now! and testing soon!

Silvers 03-30-2012 07:17

Re: [L4D & L4D2] Plane Crash (1.0) [30-Mar-2012]
 
It actually only took an hour to copy all the data and make a basic working version. It's pretty much a copy of the Dead Air plane crash and thankfully was easier than expected.

Note the "Show Crash" button in the menu will display a temporary crash from your position and eye angles. This does not show the save crash, the only way to view that is to trigger it, either with the trigger box or after a specified time.

Optics233 03-30-2012 09:26

Re: [L4D & L4D2] Plane Crash (1.0) [30-Mar-2012]
 
Holy crap this is friggin nuts! I'm a little confused as to where the plane spawns though?? Whenever I spawn a crash, even if I just point straight down below my feet, the plane seems to spawn somewhere at random. If I point directly straight ahead of me in an open area, shouldn't the plane come FROM there? I can never figure out how to position my cursor so players will see the plane directly in front of them when I spawn the crash. How do I go about that? Edit: On no mercy the plane spawned in the sky when I pointed at it, but on swamp fever map 1 it seemed to be spawning at random places. Weird! Also you said the show crash only shows a temp crash, do all players see that temp crash? It'd suck if they didn't. :(

Silvers 03-30-2012 09:37

Re: [L4D & L4D2] Plane Crash (1.0) [30-Mar-2012]
 
I did write in the first post... Play c8m5, most other maps have fog blocking you from seeing it spawn. The crash position is not exact and changes depending on your horizontal angle. It spawns directly infront of you and crashes to the left somewhere.

Optics233 03-30-2012 09:38

Re: [L4D & L4D2] Plane Crash (1.0) [30-Mar-2012]
 
Quote:

Originally Posted by Silvers (Post 1678608)
I did write in the first post... Play c8m5, most other maps have fog blocking you from seeing it spawn. The crash position is not exact and changes depending on your horizontal angle. It spawns directly infront of you and crashes to the left somewhere.

On no mercy roof top I got it working , the plane spawned in front of me in the sky. But on swamp fever map 1 it seemed to be spawning in random spots.

Optics233 03-30-2012 09:45

Re: [L4D & L4D2] Plane Crash (1.0) [30-Mar-2012]
 
A cool feature would be to have a command that places the plane's final position on your cursor. :)

Silvers 03-30-2012 09:56

Re: [L4D & L4D2] Plane Crash (1.0) [30-Mar-2012]
 
I would have done that if it was simple to do, but it isn't.

Optics233 03-30-2012 10:00

Re: [L4D & L4D2] Plane Crash (1.0) [30-Mar-2012]
 
Oh well no problem, this is a lot of fun as it is anyway. Great idea and great plugin! :)

Now it would be cool to be able to spawn the storms from hard rain anywhere lol.

Silvers 03-30-2012 10:01

Re: [L4D & L4D2] Plane Crash (1.0) [30-Mar-2012]
 
Quote:

Originally Posted by Optics233 (Post 1678621)
Now it would be cool to be able to spawn the storms from hard rain anywhere lol.

Yeah working on that.


All times are GMT -4. The time now is 16:02.

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