You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-- Check for sniper rifle local currentWeapon = GetSelectedPedWeapon(PlayerPedId()) if currentWeapon == GetHashKey("WEAPON_SNIPERRIFLE") or currentWeapon == GetHashKey("WEAPON_MARKSMANRIFLE") or currentWeapon == GetHashKey("WEAPON_MARKSMANRIFLE_MK2") or currentWeapon == GetHashKey("WEAPON_HEAVYSNIPER") then ShowHudComponentThisFrame(14) else HideHudComponentThisFrame(14) end
This works, but there's likely a more elegant solution that could go in a config or something, to account for custom weapons, future additions by rockstar.
Expected behavior
Snipers/scoped weapons display their reticle, even when reticles are disabled
Actual behavior
Hides sniper reticle
Additional context
While many people disable the crosshair for many reasons (RP, replacing it with their own server's crosshair, etc) this creates a problem for scoped weapons, as the overlay is actually the same type of reticle used in third person, just a different style.
Current Version
N/A
Custom Resources
N/A
The text was updated successfully, but these errors were encountered:
Additionally a check for IsFirstPersonAimCamActive() to hide the 14 component should be done to hide the base game reticle when not aiming into a scope.
This is how it should look/function:
sniper.fixed.-.Made.with.Clipchamp.mp4
This is done using the above fix with the addition of IsFirstPersonAimCamActive() that went stale.
Summary
hidehudcomponents doesn't consider that some weapons have scope reticules
Reproduction
This is an issue with how hidehudcomponents is coded.
qbx_smallresources/qbx_hudcomponents/client.lua
Line 40 in a549aed
For example, in this fix that went stale in qb-smallresources:
https://github.com/qbcore-framework/qb-smallresources/pull/326/files#diff-e7bc7e42f01f31f2c93fcc43ba761b7a547f8cee620a4d596c2fdb5dc175feff
Detection is done by doing:
-- Check for sniper rifle local currentWeapon = GetSelectedPedWeapon(PlayerPedId()) if currentWeapon == GetHashKey("WEAPON_SNIPERRIFLE") or currentWeapon == GetHashKey("WEAPON_MARKSMANRIFLE") or currentWeapon == GetHashKey("WEAPON_MARKSMANRIFLE_MK2") or currentWeapon == GetHashKey("WEAPON_HEAVYSNIPER") then ShowHudComponentThisFrame(14) else HideHudComponentThisFrame(14) end
This works, but there's likely a more elegant solution that could go in a config or something, to account for custom weapons, future additions by rockstar.
Expected behavior
Snipers/scoped weapons display their reticle, even when reticles are disabled
Actual behavior
Hides sniper reticle
Additional context
While many people disable the crosshair for many reasons (RP, replacing it with their own server's crosshair, etc) this creates a problem for scoped weapons, as the overlay is actually the same type of reticle used in third person, just a different style.
Current Version
N/A
Custom Resources
N/A
The text was updated successfully, but these errors were encountered: