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

[L4D1 & L4D2] Ledge Release


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Plugin ID:
6580
Plugin Version:
3.5
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    6 
    Plugin Description:
    Allows to release from the ledge using "Space" (JUMP) or other keys
    Old 05-26-2019 , 11:11   [L4D1 & L4D2] Ledge Release
    Reply With Quote #1

    Description:
    Allow you to release by your own with (JUMP), (CROUCH) or (USE) key when you grabbed the ledge.
    Plugin is based on:
    - "Incapped Pills Pop" by AtomicStryker (fork by Dragokas)
    - "L4D Ledge Release" by AltPluzF4, maintained by Madcap
    Difference:
    - Works stable.
    - Less CPU usage.
    - More safe checks.
    - Ugly hang music stop.
    - More options.
    Settings (ConVars):

    Located at /cfg/sourcemod/l4d_ledge_release.cfg
    PHP Code:
    // Enable this plugin (1 - Yes, 2 - No)
    l4d_ledge_release_enable "1"

    // How long before grabbing the ledge you can release
    l4d_ledge_release_delaytime "1.0"

    // 0 - Disable, 1 - Enable survivor hp penalty for hanging too long on a ledge
    l4d_ledge_release_use_penalty "1"

    // What button to press for release? 2 - Jump, 4 - Duck, 32 - Use. You can combine
    l4d_ledge_release_button "4"

    // What messages to display? -1 - All, 1 - Advertisements, 2 - Warnings
    l4d_ledge_release_msg_level "-1" 
    Requirements:
    - SourceMod 1.10+
    - DHooks Detours v.2.2.0.15+
    Translations
    - English
    - Russian
    Compatibility
    - L4D1
    - L4D2
    Credits:
    - Re:Creator, Lux, BHaType, Silvers - for various methods suggested to stop the music.
    Related plugins:
    - [L4D1] Health Exploit Fix by Dragokas
    - [L4D1 & L4D2] Incapped Pills Pop by Dragokas
    - [L4D, L4D2] No Death Check Until Dead by chinagreenelvis
    Donate
    Donates are very appreciated and welcomed for further inspiration, make me happy, and make next updates came out more often:
    - Patreon (Paypal)
    - BitCoin
    - Ю.Money
    Attached Files
    File Type: zip Ledge_Release_v3.zip (20.2 KB, 454 views)
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

    Last edited by Dragokas; 01-30-2022 at 08:00.
    Dragokas is offline
    Lux
    Veteran Member
    Join Date: Jan 2015
    Location: Cat
    Old 05-26-2019 , 13:31   Re: [L4D] Ledge Release v2
    Reply With Quote #2

    This will not really work.

    PHP Code:
    public void OnNextFrame(any client)
    {
        if (!
    IsClientInGame(client))
            return;
        
        
    ClientCommand(client"music_dynamic_stop_playing Event.LedgeHangTwoHands");
        
    ClientCommand(client"music_dynamic_stop_playing Event.LedgeHangOneHand");
        
    ClientCommand(client"music_dynamic_stop_playing Event.LedgeHangFingers");
        
    ClientCommand(client"music_dynamic_stop_playing Event.LedgeHangAboutToFall");
        
    ClientCommand(client"music_dynamic_stop_playing Event.LedgeHangFalling");
        
        
    StopSound(clientSNDCHAN_STATIC"music/terror/ClingingToHell1.wav");
        
    StopSound(clientSNDCHAN_STATIC"music/terror/ClingingToHell2.wav");
        
    StopSound(clientSNDCHAN_STATIC"music/terror/ClingingToHell3.wav");
        
    StopSound(clientSNDCHAN_STATIC"music/terror/ClingingToHell4.wav");

    You wanna use the give health command so engine dispatches to the music system to stop the music.

    or you can use a sdkcall to Music::Stop().
    which sends a usermessage to client.
    __________________
    Connect
    My Plugins: KlickME
    [My GitHub]

    Commission me for L4D

    Last edited by Lux; 05-26-2019 at 13:31.
    Lux is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 05-26-2019 , 15:22   Re: [L4D] Ledge Release v2
    Reply With Quote #3

    Thank you, Lux.
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
    Dragokas is offline
    BHaType
    Great Tester of Whatever
    Join Date: Jun 2018
    Old 05-27-2019 , 00:04   Re: [L4D] Ledge Release v2
    Reply With Quote #4

    PHP Code:
    Music::StopMusic(Music *this, const char *, floatbool)
    \
    x55\x8B\xEC\x8B\x45\x10\xD9\x45\x0C\x8B\x55\x08 
    BHaType is offline
    Send a message via AIM to BHaType
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 05-27-2019 , 08:26   Re: [L4D] Ledge Release v2
    Reply With Quote #5

    Quote:
    Originally Posted by BHaType View Post
    PHP Code:
    Music::StopMusic(Music *this, const char *, floatbool)
    \
    x55\x8B\xEC\x8B\x45\x10\xD9\x45\x0C\x8B\x55\x08 

    This function is called by: sv_stop_music <name of gamesound music> which sends the usermessage "MusicCmd" to stop. This sigs for L4D2 only. Suprised it doesn't break without wildcard compared to 2017 binary.
    __________________
    Silvers is offline
    Lux
    Veteran Member
    Join Date: Jan 2015
    Location: Cat
    Old 05-31-2019 , 11:28   Re: [L4D] Ledge Release v2
    Reply With Quote #6

    Quote:
    Originally Posted by Silvers View Post
    This function is called by: sv_stop_music <name of gamesound music> which sends the usermessage "MusicCmd" to stop. This sigs for L4D2 only. Suprised it doesn't break without wildcard compared to 2017 binary.
    I'm not sure if sv_stop_music will dispatch it to everyone, if so you may need to hook MusicCmd usermessage and strip away all other clients if you use that method maybe.
    __________________
    Connect
    My Plugins: KlickME
    [My GitHub]

    Commission me for L4D
    Lux is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 01-21-2020 , 14:10   Re: [L4D] Ledge Release v2
    Reply With Quote #7

    Updated.

    Quote:
    2.3 (23-Nov-2019)
    - Fixed infinite hanging sound.
    - Now, correctly set health (compatible with my "Health Exploit Fix" plugin) and fire appropriate event.
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
    Dragokas is offline
    xZk
    Senior Member
    Join Date: Nov 2017
    Location: cl
    Old 01-21-2020 , 14:43   Re: [L4D] Ledge Release v2
    Reply With Quote #8

    great!, a suggestion could you add some cmd to release, or a cvar to edit the default key
    xZk is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 01-21-2020 , 14:51   Re: [L4D] Ledge Release v2
    Reply With Quote #9

    why? Usually players get hang when they try to jump next to the cliff. They are jumping using 'Space' key, so logically the can use the same key to continue jump if they get hang.

    if you request I can add, if it is just suggestion, I see if anybody else comment about the need to change default key.
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
    Dragokas is offline
    xZk
    Senior Member
    Join Date: Nov 2017
    Location: cl
    Old 01-21-2020 , 16:26   Re: [L4D] Ledge Release v2
    Reply With Quote #10

    fail i'm sorry, it was a request, I still have to improve my English xd.
    I tested this on l4d2 and i have a bug: the survivor does not restore your hp correctly
    https://imgur.com/a/vVGHEe0
    edit:
    I think that now I realize that this restoration was necessary to avoid losing a lot of hp or killing yourself when released xd. I will leave this alternative version for L4D2, in case someone else doesn't like that
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d_ledge_release.sp - 578 views - 12.4 KB)

    Last edited by xZk; 01-26-2020 at 11:48.
    xZk is offline
    Reply


    Thread Tools
    Display Modes

    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 00:59.


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