Garry's Mod

Garry's Mod

805 个评价
Sniper Glint
3
2
   
奖励
收藏
已收藏
取消收藏
素材类型: 插件
插件类型: 工具
插件标签: 快乐, 写实
文件大小
发表于
更新日期
3.496 KB
2020 年 4 月 24 日 下午 9:32
2023 年 2 月 2 日 下午 8:21
4 项改动说明 ( 查看 )

订阅以下载
Sniper Glint

在 SweptThr.one 的 1 个合集中
SweptThrone Catalogue
135 件物品
描述
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
143 条留言
melvin 9 月 22 日 上午 7:40 
does it work with cams?
Unaverage Joe. 4 月 22 日 下午 11:26 
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 2024 年 12 月 24 日 上午 8:32 
is tac-rp compatable?
AHatINSPACE 2023 年 12 月 29 日 下午 5:10 
can you do arc9
zxssty 2023 年 12 月 27 日 上午 3:44 
does this work in single player?
Tom 2023 年 11 月 15 日 上午 3:05 
Is (GDCW) supported?
Eclipse 2023 年 10 月 11 日 上午 11:19 
TFA AT maybe?
ata47 2023 年 7 月 27 日 上午 3:16 
Whats TFA AT
Koba 2023 年 6 月 27 日 下午 1:28 
ARC9 is pretty similar to ARCCW code wise it wouldnt be too hard for you to do
SweptThr.one  [作者] 2023 年 6 月 27 日 上午 11:17 
no