-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathSniperCrosshair.lua
More file actions
29 lines (25 loc) · 1007 Bytes
/
Copy pathSniperCrosshair.lua
File metadata and controls
29 lines (25 loc) · 1007 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--[[
Checkbox in Visuals -> Other -> Extra
]]
local SniperCrosshair = gui.Checkbox(gui.Reference('Visuals', 'Other', 'Extra'), 'snipercrosshair', 'Sniper Crosshair', 0)
SniperCrosshair:SetDescription('Display in-game crosshair for snipers.')
client.AllowListener('item_equip')
callbacks.Register('FireGameEvent', function(Event)
if not gui.GetValue('esp.master') or not SniperCrosshair:GetValue() or Event:GetName() ~= 'item_equip' then
if not SniperCrosshair:GetValue() and client.GetConVar('weapon_debug_spread_show') == '3' then
client.SetConVar('weapon_debug_spread_show', 0, true)
return
end
return
end
local LocalPlayerIndex = client.GetLocalPlayerIndex()
local PlayerIndex = client.GetPlayerIndexByUserID( Event:GetInt('userid') )
local WeaponType = Event:GetInt('weptype')
if LocalPlayerIndex == PlayerIndex then
if WeaponType == 5 then
client.SetConVar('weapon_debug_spread_show', 3, true)
else
client.SetConVar('weapon_debug_spread_show', 0, true)
end
end
end)