Today I am going to be releasing another one of my private scripts I have been using on my servers. I have had thought about releasing this before my last resource I did but I never ended up doing so but after several requests for an add on like this or similar to this I am going to post it and make it public enjoy!
Could be exported to another script he uses, or a function he tried using and it didn’t work. If I were to release anything of mine, there’d be so much coding that’s not noted, and doesn’t even work lol
The mods responded and sorted this out, thanks!
What? This is an exact copy of the code wolfknight released and then the community fixed it. I reposted the code here 17days ago and its completely the same. The credit should go to @WolfKnight179
Wolfknights code
--[[------------------------------------------------------------------------
Remove Reticle on ADS (Third Person)
------------------------------------------------------------------------]]--
local scopedWeapons =
{
100416529, -- WEAPON_SNIPERRIFLE
205991906, -- WEAPON_HEAVYSNIPER
3342088282 -- WEAPON_MARKSMANRIFLE
}
function HashInTable( hash )
for k, v in pairs( scopedWeapons ) do
if ( hash == v ) then
return true
end
end
return false
end
function ManageReticle()
local ped = GetPlayerPed( -1 )
if ( DoesEntityExist( ped ) and not IsEntityDead( ped ) ) then
local _, hash = GetCurrentPedWeapon( ped, true )
if ( GetFollowPedCamViewMode() ~= 4 and IsPlayerFreeAiming() and not HashInTable( hash ) ) then
HideHudComponentThisFrame( 14 )
end
end
end
Citizen.CreateThread( function()
while true do
HideHudComponentThisFrame( 14 )
Citizen.Wait( 0 )
end
end )
Posted Code
--[[------------------------------------------------------------------------
Remove Reticle on ADS (Third Person) Resource created by TheLukasGran
------------------------------------------------------------------------]]--
local scopedWeapons =
{
100416529, -- WEAPON_SNIPERRIFLE
205991906, -- WEAPON_HEAVYSNIPER
3342088282 -- WEAPON_MARKSMANRIFLE
}
function HashInTable( hash )
for k, v in pairs( scopedWeapons ) do
if ( hash == v ) then
return true
end
end
return false
end
function ManageReticle()
local ped = GetPlayerPed( -1 )
if ( DoesEntityExist( ped ) and not IsEntityDead( ped ) ) then
local _, hash = GetCurrentPedWeapon( ped, true )
if ( GetFollowPedCamViewMode() ~= 4 and IsPlayerFreeAiming() and not HashInTable( hash ) ) then
HideHudComponentThisFrame( 14 )
end
end
end
Citizen.CreateThread( function()
while true do
HideHudComponentThisFrame( 14 )
Citizen.Wait( 0 )
end
end )