[Release] Remove Weapon DOT/RETICLE on ADS

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 @WolfKnight179 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.
3 Likes

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.

1 Like

Delete this topic please. Plagia spotted

1 Like

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

2 Likes

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).

2 Likes

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:

3 Likes

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 )
4 Likes

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

1 Like

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

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.

1 Like

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

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

1 Like

there is 1 problem when people die they crash?

Failed to load script anon-server.lua.

SOmething missing?

Yeah, but it disable jets reticle too.

does anyone know a fix with the sniper rifles having no reticle?

Aint working. I tried starting it and nothing

Hey I tried you’res and it doesn’t work. I put it in and even added a resource file and everyone still has a reticle.

Did you configure the permissions?