[Release] Remove Weapon DOT/RETICLE on ADS

dot
weapon
site
aim
reticle

#1

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!

REMOVE WEAPON DOT/RETICLE

TLG-ADS.rar (1007 Bytes)

Alternate link:
https://mega.nz/#!StsBUBpa!kfYLWutJF8eeb37dldCJhxpKdww1TI_vqI_o2aslqm4

This is a very simple install just like my past resource it does include a README.txt if you do not know how to install such resources.

credits to @WolfKnight for creating the orginal script which I have turned into this resource so people can actually use on their server.

Known Issues:

  • When ADS using sniper rifle scopes the reticle will not show up.

#2

Someone just released a resource identical to this one. Pretty sure this is just a copy of it and even if it isn’t not really necissary.


#3

Delete this topic please. Plagia spotted


#4

If you are saying this is plagiarism of ToastinYou’s resource, that’s simply incorrect. Each resource goes about solving the issue differently.


#5

No big deal guys, merely a coincidence. I don’t see any code that was copied from my project (it’s open source either way).


#6

I’ve looked at the source code for both and they are different. Not plagiarized. Both scripts are written differently but, achieve the same outcome.

@TheLukasGran why have you made two functions and a table when they’re never used? :stuck_out_tongue:


#7

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


#8

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 @WolfKnight

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 )

#9

The only difference is, that he added Resource created by TheLukasGran

But by that out of the way, it dosen’t seems to work. There is still no scope on the sniperriffle


#10

Any way, both scripts do not even use function ManageReticle, even it’s declared :smiley:


#11

I use the script and it works for all players, doesn’t show up when you left click and my sniper scopes work but there is no crosshair.


#12

yeah it seems to remove the crosshair but sniper scopes are a no go… anyone ever find a fix to that?


#13

@novalokhd this is a script I made and it disables the reticle, but keeps the sniper scope.