Garry's Mod

Garry's Mod

790 ratings
Sniper Glint
3
2
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
Addon Tags: Fun, Realism
File Size
Posted
Updated
3.496 KB
24 Apr, 2020 @ 9:32pm
2 Feb, 2023 @ 8:21pm
4 Change Notes ( view )

Subscribe to download
Sniper Glint

In 1 collection by SweptThr.one
SweptThrone Catalogue
135 items
Description
See where you're about to get sniped from.

//

Tired of dying to snipers you can't even see? Tired of your super serious military roleplay server not being realistic enough? Sniper Glint can fix that!

Sniper Glint is a very simple addon that adds a scope glint effect to most common weapons. Just install it on your server or game, and it's ready to go!

While this addon works out-of-the-box, you may find some things that don't quite look exactly how you want to. I've tried to include some ConVars to help you tweak it to your heart's content.
sv_st_glint_mindist - Minimum distance the glint will be drawn. Requires restart. Default 400
sv_st_glint_maxsize - Maximum size of the glint. Default 1000
sv_st_glint_minsize - Minimum size of the glint. Default 0
sv_st_glint_sizedivisor - An arbitrary value controlling how big the glint is. Lower makes it bigger. Default 75000

Support summary:
TFA Base - Supported if the weapon is scoped, but also works generally as long as the right mouse button is held.
M9K Base - Supported if the weapon is scoped.
FA:S2 Base - Supported if the weapon has a scope by default. Attached scopes will not work.
CW2.0 Base - Supported if the weapon has a scope by default. Attached scopes will not work.
Any other base - Supported if SWEP.CustomShouldGlint is true and SWEP:CustomGlintFunc() returns true.
ArcCW - Has its own version, so if you use this addon with it, this won't do anything.
TTT Base - Unsupported because there's no way to tell the difference between a scoped and non-scoped weapon.
ACT3/ASTW/ArcVR/Arc9/Arc10/etc. Base - Not supported
HL2 Crossbow - Not supported
TFA AT - Not supported
MW Base - Not supported

I made this because I took a week off and wanted to do something.

This should work in all gamemodes as long as the base is supported.


[sweptthr.one]

Credits:
Me - All of the code
142 Comments
Unaverage Joe. 22 Apr @ 11:26pm 
No idea if this addon is still updated but wgetjane discovered this a while back.

Most scoped/zoom weapons in TTT will utilize the wep.SetZoom() function, if you could check for:
wep.GetIronsights (player is ADSing),
wep.SetZoom (weapon is able to zoom in),
ply:GetFOV (weapon has high enough magification),
you can somewhat decently check if a TTT weapon has a scope.

Here's what I've used: wep.Base == "weapon_tttbase" and ( wep.GetIronsights and wep:GetIronsights() and (wep.SetZoom and ply:GetFOV() <= 20))
unlikeaboss 24 Dec, 2024 @ 8:32am 
is tac-rp compatable?
oneshot:) 29 Dec, 2023 @ 5:10pm 
can you do arc9
zxssty 27 Dec, 2023 @ 3:44am 
does this work in single player?
Tom 15 Nov, 2023 @ 3:05am 
Is (GDCW) supported?
Eclipse 11 Oct, 2023 @ 11:19am 
TFA AT maybe?
ata47 27 Jul, 2023 @ 3:16am 
Whats TFA AT
Wedge 27 Jun, 2023 @ 1:28pm 
ARC9 is pretty similar to ARCCW code wise it wouldnt be too hard for you to do
SweptThr.one  [author] 27 Jun, 2023 @ 11:17am 
no
Wedge 27 Jun, 2023 @ 10:19am 
Does not work with ARC9, please make it work with ARC9, thanks.