Jump to content

[BUG]Sniper Scope Bugged! (Please Help)


Soapbosnia

Recommended Posts

Hello,i got a script which replaces the default sniper scope with a custom one by using shaders,now i got the bug that my scope doesnt draw correctly,it draws 4 scopes :/

Here is the code :/

table = {
	
    {"files/siterocket.png", "siterocket"},
    {"files/SNIPERcrosshair.png", "SNIPERcrosshair"},

}


addEventHandler( "onClientResourceStart", resourceRoot,
function()
    for i = 1, #table do
        local shader, tec = dxCreateShader ( "texreplace.fx" )
        local tex = dxCreateTexture ( ""..table[i][1].."" )
        engineApplyShaderToWorldTexture ( shader, table[i][2] )
        engineApplyShaderToWorldTexture ( shader, table[i][2].."lod" )
        dxSetShaderValue ( shader, "gTexture", tex )
    end
end)

 

Link to comment
8 minutes ago, Ren_712 said:

This is an example of radar disc image in hud.txd:

radardisc.png

like I said - your radar/sniper scope etc. just a first quarter of the image. Otherwise you'll see 4 discs instead of 1.

K bro il try,thx anyway ;)

Another question how do i replace vehicles with shaders i mean i got .png files of hydra skins,i want to use the .png files to replace the hydra,possible?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...