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

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


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
2861
Plugin Version:
1.11
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    38 
    Plugin Description:
    Creates the Dead Air Plane Crash on any map.
    Old 03-30-2012 , 06:46   [L4D & L4D2] Plane Crash (1.11) [10-Jan-2023]
    Reply With Quote #1


    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.
    Attached Files
    File Type: cfg l4d_plane_crash.cfg (2.6 KB, 1307 views)
    File Type: sp Get Plugin or Get Source (l4d_plane_crash.sp - 967 views - 51.8 KB)
    __________________

    Last edited by Silvers; 01-09-2023 at 22:00.
    Silvers is offline
    andre_sca
    Member
    Join Date: Jan 2011
    Old 03-30-2012 , 07:11   Re: [L4D & L4D2] Plane Crash (1.0) [30-Mar-2012]
    Reply With Quote #2

    oh my god! it's amazing! how you guys can do those stuffs? i can't even make a color plugin
    Amazing! download right now! and testing soon!
    andre_sca is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 03-30-2012 , 07:17   Re: [L4D & L4D2] Plane Crash (1.0) [30-Mar-2012]
    Reply With Quote #3

    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.
    __________________
    Silvers is offline
    Optics233
    Member
    Join Date: Nov 2010
    Old 03-30-2012 , 09:26   Re: [L4D & L4D2] Plane Crash (1.0) [30-Mar-2012]
    Reply With Quote #4

    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.

    Last edited by Optics233; 03-30-2012 at 09:38.
    Optics233 is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 03-30-2012 , 09:37   Re: [L4D & L4D2] Plane Crash (1.0) [30-Mar-2012]
    Reply With Quote #5

    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.
    __________________
    Silvers is offline
    Optics233
    Member
    Join Date: Nov 2010
    Old 03-30-2012 , 09:38   Re: [L4D & L4D2] Plane Crash (1.0) [30-Mar-2012]
    Reply With Quote #6

    Quote:
    Originally Posted by Silvers View Post
    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 is offline
    Optics233
    Member
    Join Date: Nov 2010
    Old 03-30-2012 , 09:45   Re: [L4D & L4D2] Plane Crash (1.0) [30-Mar-2012]
    Reply With Quote #7

    A cool feature would be to have a command that places the plane's final position on your cursor.
    Optics233 is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 03-30-2012 , 09:56   Re: [L4D & L4D2] Plane Crash (1.0) [30-Mar-2012]
    Reply With Quote #8

    I would have done that if it was simple to do, but it isn't.
    __________________
    Silvers is offline
    Optics233
    Member
    Join Date: Nov 2010
    Old 03-30-2012 , 10:00   Re: [L4D & L4D2] Plane Crash (1.0) [30-Mar-2012]
    Reply With Quote #9

    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.
    Optics233 is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 03-30-2012 , 10:01   Re: [L4D & L4D2] Plane Crash (1.0) [30-Mar-2012]
    Reply With Quote #10

    Quote:
    Originally Posted by Optics233 View Post
    Now it would be cool to be able to spawn the storms from hard rain anywhere lol.
    Yeah working on that.
    __________________
    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 09:34.


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