Raised This Month: $51 Target: $400
 12% 

[L4D & L4D2] Swimming (1.9) [11-Dec-2022]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
3011
Plugin Version:
1.9
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    7 
    Plugin Description:
    Lets players Swim and Dive in water.
    Old 06-15-2012 , 00:47   [L4D & L4D2] Swimming (1.9) [11-Dec-2022]
    Reply With Quote #1

    About:
    • Lets survivors swim in water. Either on the surface or they can dive.
    • Set the rate of oxygen depletion while diving, kills them if they run out of air.


    Thanks for testing:
    • Dont Fear The Reaper.
    • disawar1.


    Cvars:

    Saved to l4d_swim.cfg in your servers \cfg\sourcemod\ folder.

    PHP Code:
    // 0=Plugin off, 1=Plugin on.
    l4d_swim_allow "1"

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

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

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

    // 0=Only bobbin on the surface, 1=Allows players to dive.
    l4d_swim_dive "1"

    // 0=Stay on surface when caught by infected, 1=Sink when caught.
    l4d_swim_drown "1"

    // 0=Allow being incapacitated when swimming (they float). 1=Stops the player swimming letting them drown.
    l4d_swim_incap "1"

    // How much air is lost per second. Players die when they have 0 air.
    l4d_swim_rate "0.1"

    // How fast to teleport downwards when they hold DUCK.
    l4d_swim_speed_down "-30.0"

    // How fast to teleport players when they are not pressing any keys.
    l4d_swim_speed_idle "15.0"

    // How fast to teleport players when jumping out of the water.
    l4d_swim_speed_jump "400.0"

    // How fast to teleport players who are pressing the SPRINT/WALK key.
    l4d_swim_speed_up "30.0"

    // Swimming plugin version.
    l4d_swim_version 


    Changes:
    Code:
    1.9 (11-Dec-2022)
        - Changes to fix compile warnings on SourceMod 1.11.
    
    1.8 (30-Sep-2020)
        - Fixed compile errors on SM 1.11.
    
    1.7 (18-Sep-2020)
        - Added cvar "l4d_swim_incap" to control if being incapacitated in the water drowns the player.
        - Fixed rare "OnPlayerRunCmd" throwing client "not connected" or "not in game" errors.
    
    1.6 (10-May-2020)
        - Extra checks to prevent "IsAllowedGameMode" throwing errors.
    
    1.5 (01-Apr-2020)
        - Fixed "IsAllowedGameMode" from throwing errors when the "_tog" cvar was changed before MapStart.
    
    1.4 (05-May-2018)
        - Converted plugin source to the latest syntax utilizing methodmaps. Requires SourceMod 1.8 or newer.
        - Changed cvar "l4d_swim_modes_tog" now supports L4D1.
    
    1.3 (10-Jul-2012)
        - Fixed hook event errors in L4D1. Thanks to "Herbie_06" for reporting.
    
    1.2 (23-Jun-2012)
        - Removed "player_ledge_grab" event hook, prevents drowning after using ledge release.
    
    1.1 (20-Jun-2012)
        - Playes who heal under water receive full oxygen, but does not affect main health.
    
    1.0 (15-Jun-2012)
        - Initial release.


    Installation:
    1. Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.

    Updating from 1.6 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: sp Get Plugin or Get Source (l4d_swimming.sp - 499 views - 17.0 KB)
    __________________

    Last edited by Silvers; 12-11-2022 at 03:39.
    Silvers is offline
    Visual77
    Veteran Member
    Join Date: Jan 2009
    Old 06-15-2012 , 03:17   Re: [L4D & L4D2] Swimming (1.0) [15-Jun-2012]
    Reply With Quote #2

    Lool. Swamp diving? Yeah why not
    Good one, Silvers.

    Last edited by Visual77; 06-15-2012 at 03:17.
    Visual77 is offline
    adrianman
    Senior Member
    Join Date: Sep 2010
    Old 06-15-2012 , 07:47   Re: [L4D & L4D2] Swimming (1.0) [15-Jun-2012]
    Reply With Quote #3

    c5m5_bridge,can't swim without taking damage first and getting incapped,might happen on other maps too
    __________________
    The best thing in life's for free

    Last edited by adrianman; 06-15-2012 at 07:48.
    adrianman is offline
    Elektramode
    Senior Member
    Join Date: Mar 2010
    Old 06-15-2012 , 07:50   Re: [L4D & L4D2] Swimming (1.0) [15-Jun-2012]
    Reply With Quote #4

    Amazing! Shame it won't work on all maps due to those randomly placed incap zones.
    Elektramode is offline
    adrianman
    Senior Member
    Join Date: Sep 2010
    Old 06-15-2012 , 07:52   Re: [L4D & L4D2] Swimming (1.0) [15-Jun-2012]
    Reply With Quote #5

    that's what i'm saying
    __________________
    The best thing in life's for free
    adrianman is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 06-15-2012 , 08:16   Re: [L4D & L4D2] Swimming (1.0) [15-Jun-2012]
    Reply With Quote #6

    If the incap zone is specifically placed because of the water and not preventing some other exploit, then let me know which maps and where and I *may* fix it, no guarantee.
    __________________
    Silvers is offline
    adrianman
    Senior Member
    Join Date: Sep 2010
    Old 06-15-2012 , 10:31   Re: [L4D & L4D2] Swimming (1.0) [15-Jun-2012]
    Reply With Quote #7

    c5m5_bridge is a good start,as soon as you can jump in the water
    __________________
    The best thing in life's for free

    Last edited by adrianman; 06-15-2012 at 10:32.
    adrianman is offline
    SyluxLockjaw100
    Senior Member
    Join Date: Jul 2010
    Location: Novaya Russia
    Old 06-19-2012 , 04:30   Re: [L4D & L4D2] Swimming (1.0) [15-Jun-2012]
    Reply With Quote #8

    These map(s) are also good to test the plugin out

    http://www.l4dmaps.com/details.php?file=8401

    edit: I found a bug. When you heal in the water,you instantly die.
    It's Valve's fault for having 1 HP for like 0.1 seconds after you heal.
    Attached Files
    File Type: zip Swimming bug demo.zip (559.3 KB, 463 views)

    Last edited by SyluxLockjaw100; 06-19-2012 at 04:50. Reason: Found a bug and added a demo about it
    SyluxLockjaw100 is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 06-20-2012 , 04:40   Re: [L4D & L4D2] Swimming (1.1) [20-Jun-2012]
    Reply With Quote #9

    Thanks SyluxLockjaw100, the bug should be fixed, healing now sets full oxygen/temp health.

    Edit: Fixed a bug with the ledge release plugin.
    __________________

    Last edited by Silvers; 06-22-2012 at 19:23.
    Silvers is offline
    Herokim
    Senior Member
    Join Date: Mar 2010
    Location: In Fag-o-land
    Old 06-29-2012 , 00:41   Re: [L4D & L4D2] Swimming (1.2) [23-Jun-2012]
    Reply With Quote #10

    Vids, pics please?


    And yeah, hello again.
    Herokim 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 04:57.


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