Price
UnknownA script by Gamzky
Price
Unknown
Weapon Scope GlintThis FiveM resource adds a dynamic and customizable sniper scope glint to scoped weapons - just like in popular shooters. When players aim down sights with a high-powered optic, a realistic lens flare / sniper glint appears, making long-range engagements more tactical and fair.
Get it here: gamzkystore.com
Support: Discord
Detailed preview: YoutubeResmon: Idle: 0.00ms - Active: 0.02ms
Config = {
minimumGlintDistance = 10, -- The minimum distance at which the scope glint will appear, being closer too close to the scope will not show the glint.
maximumGlintDistance = 1000, -- The maximum distance at which the scope glint will appear, being further away from the scope will not show the glint. (can be limited to 400 for networked entities)
glintFieldOfView = 20, -- The field of view in which the scope glint will be visible (degrees)
disableDuringNight = true, -- Disable the scope glint during night time.
}
-- The sprite method uses a sprite to create the scope glint, this is the default method used in the video showcase.
Config.Sprite = {
enabled = true, -- Enable or disable the sprite method for the scope glint. (this is the default method)
glintSize = 1.0, -- The size of the sprite glint.
rgba = { r = 255, g = 255, b = 255, a = 255 }, -- The rgba values for the sprite glint.
}
-- The corona method uses a lighting effect (corona) to create the scope glint and can have a more realistic appearance. Feel free to try it out, you can also enable both methods at the same time if you wish to.
Config.Corona = {
enabled = false, -- Enable or disable the corona method for the scope glint.
glintSize = 1.0, -- The size of the corona glint.
glintIntensity = { 5.0, 0.05 }, -- The intensity of the glint during the day and during the night. You can tweak these values to increase or decrease the intensity of the glint depending on the time of day.
edgeIntensityThreshold = 25, -- The threshold for the intensity of the glint when on the edge of the scope's field of view. Increasing this values will make the glint appear and dissapear more smoothly.
rgba = { r = 255, g = 255, b = 255, a = 255 }, -- The rgba values for the corona glint.
}
-- All the components in this list will have the scope glint applied to them.
Config.GlintComponents = {
[`COMPONENT_AT_SCOPE_MACRO`] = true,
[`COMPONENT_AT_SCOPE_SMALL`] = true,
[`COMPONENT_AT_SCOPE_MACRO_MK2`] = true,
[`COMPONENT_AT_SCOPE_MEDIUM_MK2`] = true,
[`COMPONENT_AT_SCOPE_MACRO_02_MK2`] = true,
[`COMPONENT_AT_SCOPE_SMALL_MK2`] = true,
[`COMPONENT_AT_SCOPE_MEDIUM`] = true,
[`COMPONENT_AT_SCOPE_LARGE`] = true,
[`COMPONENT_AT_SCOPE_MAX`] = true,
[`COMPONENT_AT_SCOPE_LARGE_MK2`] = true,
[`COMPONENT_AT_SCOPE_NV`] = true,
[`COMPONENT_AT_SCOPE_THERMAL`] = true,
[`COMPONENT_AT_SCOPE_LARGE_FIXED_ZOOM`] = true,
[`COMPONENT_AT_SCOPE_LARGE_FIXED_ZOOM_MK2`] = true,
[`COMPONENT_AT_SCOPE_SMALL_02`] = true,
[`COMPONENT_AT_SCOPE_MACRO_02`] = true,
[`COMPONENT_AT_SCOPE_MACRO_02_SMG_MK2`] = true,
[`COMPONENT_AT_SCOPE_SMALL_SMG_MK2`] = true,
}
-- A debug mode, usefull to test the scope glint on your own if you wish to tweak the configuration to your liking.
Debug = {
enabled = false, -- Enables debug mode, will draw lines to the scope and camera to test if the scope is in view. The peds in the list below will also be created.
pedLocations = { -- Will create a ped with a weapon at the given coordinates, who will be aiming at the given aimCoords.
{
weapon = `weapon_sniperrifle`,
coords = vector4(-1795.26, -2772.01, 22.23, 314.95),
aimCoords = vector3(-1304.82, -2159.91, 13.94),
},
{
weapon = `weapon_heavysniper`,
coords = vector4(-1340.00, -2602.91, 31.59, 15.80),
aimCoords = vector3(-1304.82, -2159.91, 13.94),
},
{
weapon = `weapon_marksmanrifle`,
coords = vector4(-1739.84, -2912.85, 12.94, 329.96),
aimCoords = vector3(-1304.82, -2159.91, 13.94),
}
}
}
| Code is accessible | No, but there is an unencrypted version |
| Subscription-based | No |
| Lines (approximately) | 510 |
| Requirements | No, fully standalone |
| Support | Yes |
See what others are saying about this script.
Share your experience and help others.