Raised This Month: $4 Target: $400
 1% 

[L4D & L4D2] Unscope Sniper On Shoot (1.9) [11-Oct-2021]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Silvers
AlliedModders Donor
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
6981
Plugin Version:
1.9
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Un-zooms Sniper scopes on each shot.
    Old 03-14-2020 , 11:22   [L4D & L4D2] Unscope Sniper On Shoot (1.9) [11-Oct-2021]
    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.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 - 43 views - 12.3 KB)
    __________________

    Last edited by Silvers; 10-11-2021 at 05:54.
    Silvers is offline
    mathilde
    Member
    Join Date: Jan 2020
    Location: samedi et dimanche
    Old 03-15-2020 , 10: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
    AlliedModders Donor
    Join Date: Aug 2010
    Location: SpaceX
    Old 03-15-2020 , 11: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 , 11: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 , 04: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
    AlliedModders Donor
    Join Date: Aug 2010
    Location: SpaceX
    Old 05-23-2021 , 06: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 03:31.
    Silvers is offline
    AI0702
    Junior Member
    Join Date: Apr 2021
    Old 05-23-2021 , 10: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 11:19.
    AI0702 is offline
    Silvers
    AlliedModders Donor
    Join Date: Aug 2010
    Location: SpaceX
    Old 05-24-2021 , 05: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 03:31.
    Silvers is offline
    Iizuka07
    Member
    Join Date: Aug 2018
    Old 06-26-2021 , 02: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
    AlliedModders Donor
    Join Date: Aug 2010
    Location: SpaceX
    Old 06-26-2021 , 03: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


    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 21:44.


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