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

[L4D & L4D2] Unscope Sniper On Shoot (1.10) [11-Dec-2022]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
6981
Plugin Version:
1.10
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    8 
    Plugin Description:
    Un-zooms Sniper scopes on each shot.
    Old 03-14-2020 , 10:22   [L4D & L4D2] Unscope Sniper On Shoot (1.10) [11-Dec-2022]
    Reply With Quote #1

    About:
    • Makes players un-zoom / un-scope Sniper Rifles on each shot.
    • The cvar l4d_unscope_rescope auto rescopes after reloading bolt action sniper rifles.
    • Thanks to "Iizuka07" for the idea and request.


    Cvars:

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

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

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

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

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

    // 0=Off. 1=Rescope the view after shooting and reloading bolt action rifles (AWP and Scout).
    l4d_unscope_rescope "1"

    // 1=Hunting Rifle. L4D2 only: 2=Sniper Military, 4=Sniper AWP, 8=Sniper Scout. 15=All. Add numbers together.
    l4d_unscope_types "15" // "1" in L4D1.

    // Unscope plugin version.
    l4d_unscope_version 


    Changes:
    Code:
    1.10 (11-Dec-2022)
        - Changes to fix compile warnings on SourceMod 1.11.
    
    1.9 (11-Oct-2021)
        - Fixed Zoom and Unzoom logic being inverted.
    
    1.8 (02-Jul-2021)
        - Fixed randommly vocalizing. No more hackish workarounds, zooms and unzooms correctly. Thanks to "Iizuka07" for testing.
    
    1.7 (01-Jul-2021)
        - Fixed crashing by deleting entities in "SDKHook_SpawnPost" instead of "OnEntityCreated". Thanks to "Iizuka07" for reporting.
    
    1.6 (29-Jun-2021)
        - Fixed vocalizing when unscoping. Thanks to "Iizuka07" for reporting.
    
    1.5 (26-Jun-2021)
        - Fixed rescope feature adding zoom when changing weapon straight after. Thanks to "Iizuka07" for reporting.
    
    1.4 (24-May-2021)
        - Added cvar "l4d_unscope_rescope" to rescope bolt action snipers after shooting and reloading. Requested by "AI0702".
    
    1.3 (23-May-2021)
        - Fixed not unscoping while the players eyes are moving into scoped view. Thanks to "AI0702" for reporting.
        - Removed gamedata dependency.
    
    1.2a (24-Sep-2020)
        - Compatibility update for L4D2's "The Last Stand" update.
        - GameData .txt file updated.
    
    1.2 (10-May-2020)
        - Added better error log message when gamedata file is missing.
        - Extra checks to prevent "IsAllowedGameMode" throwing errors.
    
    1.1 (01-Apr-2020)
        - Fixed "IsAllowedGameMode" from throwing errors when the "_tog" cvar was changed before MapStart.
    
    1.0 (14-Mar-2020)
        - Initial release.


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


    Installation:
    1. Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d_unscope.sp - 227 views - 12.4 KB)
    __________________

    Last edited by Silvers; 12-11-2022 at 03:44.
    Silvers is offline
    mathilde
    Member
    Join Date: Jan 2020
    Location: samedi et dimanche
    Old 03-15-2020 , 09:59   Re: [L4D & L4D2] Unscope Sniper On Shoot (1.0) [14-Mar-2020]
    Reply With Quote #2

    I don't get it

    You have to press the scope button every time you shoot. Hassle, I think.
    I don't see the point.
    mathilde is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 03-15-2020 , 10:10   Re: [L4D & L4D2] Unscope Sniper On Shoot (1.0) [14-Mar-2020]
    Reply With Quote #3

    It was a request, you don't have to use.
    __________________
    Silvers is offline
    mathilde
    Member
    Join Date: Jan 2020
    Location: samedi et dimanche
    Old 03-15-2020 , 10:38   Re: [L4D & L4D2] Unscope Sniper On Shoot (1.0) [14-Mar-2020]
    Reply With Quote #4

    Ahh. Got my hopes up when I thought the plugin removes crosshair when scoped.
    My bad.
    mathilde is offline
    AI0702
    Junior Member
    Join Date: Apr 2021
    Old 05-23-2021 , 03:28   Re: [L4D & L4D2] Unscope Sniper On Shoot (1.2a) [24-Sep-2020]
    Reply With Quote #5

    There's this bug that if you open scope and immidiately shoot, the unscope doesn't happen. You need to wait approx. a second after opening the scope to make the plugin work. Same case if you start shooting real fast.


    Also, not related to the plugin. When you shoot while scoped, your scope view doesn't move as it should when you reload the bolt action after each shot (but the flashlight does). This is how the game works, any chance we could do something about this too?
    AI0702 is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 05-23-2021 , 05:06   Re: [L4D & L4D2] Unscope Sniper On Shoot (1.2a) [24-Sep-2020]
    Reply With Quote #6

    Quote:
    Originally Posted by AI0702 View Post
    There's this bug that if you open scope and immidiately shoot, the unscope doesn't happen. You need to wait approx. a second after opening the scope to make the plugin work. Same case if you start shooting real fast.


    Also, not related to the plugin. When you shoot while scoped, your scope view doesn't move as it should when you reload the bolt action after each shot (but the flashlight does). This is how the game works, any chance we could do something about this too?
    Seems like calling it to unscope whilst scoping starts doesn't work.
    Fixed:
    Code:
    1.3 (23-May-2021)
        - Fixed not unscoping while the players eyes are moving into scoped view. Thanks to "AI0702" for reporting.
        - Removed gamedata dependency.
    I'm guessing the CSS bolt action is broken? This is something that should be taken up with Valve and fixed by them. Changing the clients view from the server side would be very laggy looking, something I won't be looking into.
    __________________

    Last edited by Silvers; 06-26-2021 at 02:31.
    Silvers is offline
    AI0702
    Junior Member
    Join Date: Apr 2021
    Old 05-23-2021 , 09:51   Re: [L4D & L4D2] Unscope Sniper On Shoot (1.2a) [24-Sep-2020]
    Reply With Quote #7

    Quote:
    Originally Posted by Silvers View Post
    Seems like calling it to unscope whilst scoping starts doesn't work.
    Fixed:
    Code:
    1.3 (23-May-2021)
        - Fixed not unscoping while the players eyes are moving into scoped view.
        - Removed gamedata dependency.
    I'm guessing the CSS bolt action is broken? This is something that should be taken up with Valve and fixed by them. Changing the clients view from the server side would be very laggy looking, something I won't be looking into.

    That was fast. About the scope not moving naturally (while the flashlight does) during the bolt action reload after each shot, is indeed how valve programmed it. This issue is present with all bolt action snipers (AWP, Scout...). This plugin completely bypasses the issue.

    However, I have another suggestion, if possible, to have the sniper re-scope after the bolt-action is performed after each shot. For example, ADS --> Shoot --> Unscope --> reload bolt-action --> Rescope.
    (while also blocking the scope input during bolt action is being performed, to prevent sudden manual rescoping by the player).

    Last edited by AI0702; 05-23-2021 at 10:19.
    AI0702 is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 05-24-2021 , 04:36   Re: [L4D & L4D2] Unscope Sniper On Shoot (1.4) [24-May-2021]
    Reply With Quote #8

    Quote:
    Originally Posted by AI0702 View Post
    That was fast. About the scope not moving naturally (while the flashlight does) during the bolt action reload after each shot, is indeed how valve programmed it. This issue is present with all bolt action snipers (AWP, Scout...). This plugin completely bypasses the issue.

    However, I have another suggestion, if possible, to have the sniper re-scope after the bolt-action is performed after each shot. For example, ADS --> Shoot --> Unscope --> reload bolt-action --> Rescope.
    (while also blocking the scope input during bolt action is being performed, to prevent sudden manual rescoping by the player).

    Done:

    Code:
    1.4 (24-May-2021)
        - Added cvar "l4d_unscope_rescope" to rescope bolt action snipers after shooting and reloading. Requested by "AI0702".
    __________________

    Last edited by Silvers; 06-26-2021 at 02:31.
    Silvers is offline
    Iizuka07
    Senior Member
    Join Date: Aug 2018
    Location: Underground
    Old 06-26-2021 , 01:03   Re: [L4D & L4D2] Unscope Sniper On Shoot (1.4) [24-May-2021]
    Reply With Quote #9

    Quote:
    Originally Posted by Silvers View Post
    Done:

    Code:
    1.4 (24-May-2021)
        - Added cvar "l4d_unscope_rescope" to rescope bolt action snipers after shooting and reloading.
    There's a bug on this unlike the previous version 1.2a. When you do a quick scope, the zoom is stuck when changing into secondary pistols
    __________________
    死が待っている
    Iizuka07 is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 06-26-2021 , 02:30   Re: [L4D & L4D2] Unscope Sniper On Shoot (1.5) [26-Jun-2021]
    Reply With Quote #10

    Thanks should be fixed.

    Code:
    1.5 (26-Jun-2021)
        - Fixed rescope feature adding zoom when changing weapon straight after. Thanks to "Iizuka07" for reporting.
    __________________
    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 18:48.


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