Basic script to disable the reticle when you aim in with any weapon (with the exception of snipers). Made this to add realism rather than being able to pop someone in the head with one bullet.
With ACE, yes.
I’m busy so I won’t bother testing this but it should work:
Citizen.CreateThread(function()
local isSniper = false
while true do
Citizen.Wait(0)
local ped = GetPlayerPed(-1)
local currentWeaponHash = GetSelectedPedWeapon(ped)
if currentWeaponHash == 100416529 then
isSniper = true
elseif currentWeaponHash == 205991906 then
isSniper = true
elseif currentWeaponHash == -952879014 then
isSniper = true
elseif currentWeaponHash == GetHashKey('WEAPON_HEAVYSNIPER_MK2') then
isSniper = true
else
isSniper = false
end
if not isSniper then
if not IsPlayerAceAllowed(source, 'reticle') then
HideHudComponentThisFrame(14)
end
end
end
end)
Grant the ‘reticle’ ACE permission to players whom you want to have reticles.
Add this to your server.cfg:
Yes, he was being helpful, but reviving 2 months old topics is not necessary, think, if everyone was commenting on 2-3 months old topics, then the forums would be flooded by old posts, and the newer posts would be drowned.
- Added use of ace permissions to allow certain groups to have a visible reticle.
- ALL snipers now have the proper HUD display (reticle is not disabled on snipers).
- (Probably) performance improvement.