AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D & L4D2] Unscope Sniper On Shoot (1.10) [11-Dec-2022] (https://forums.alliedmods.net/showthread.php?t=322064)

Silvers 03-14-2020 10:22

[L4D & L4D2] Unscope Sniper On Shoot (1.10) [11-Dec-2022]
 
11 Attachment(s)
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.

mathilde 03-15-2020 09:59

Re: [L4D & L4D2] Unscope Sniper On Shoot (1.0) [14-Mar-2020]
 
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.

Silvers 03-15-2020 10:10

Re: [L4D & L4D2] Unscope Sniper On Shoot (1.0) [14-Mar-2020]
 
It was a request, you don't have to use.

mathilde 03-15-2020 10:38

Re: [L4D & L4D2] Unscope Sniper On Shoot (1.0) [14-Mar-2020]
 
Ahh. Got my hopes up when I thought the plugin removes crosshair when scoped.
My bad.

AI0702 05-23-2021 03:28

Re: [L4D & L4D2] Unscope Sniper On Shoot (1.2a) [24-Sep-2020]
 
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?

Silvers 05-23-2021 05:06

Re: [L4D & L4D2] Unscope Sniper On Shoot (1.2a) [24-Sep-2020]
 
Quote:

Originally Posted by AI0702 (Post 2747567)
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.

AI0702 05-23-2021 09:51

Re: [L4D & L4D2] Unscope Sniper On Shoot (1.2a) [24-Sep-2020]
 
Quote:

Originally Posted by Silvers (Post 2747575)
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).

Silvers 05-24-2021 04:36

Re: [L4D & L4D2] Unscope Sniper On Shoot (1.4) [24-May-2021]
 
Quote:

Originally Posted by AI0702 (Post 2747599)
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".


Iizuka07 06-26-2021 01:03

Re: [L4D & L4D2] Unscope Sniper On Shoot (1.4) [24-May-2021]
 
Quote:

Originally Posted by Silvers (Post 2747675)
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

Silvers 06-26-2021 02:30

Re: [L4D & L4D2] Unscope Sniper On Shoot (1.5) [26-Jun-2021]
 
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.



All times are GMT -4. The time now is 22:39.

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