Soapbosnia

[BUG]Sniper Scope Bugged! (Please Help)

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)

 

Share this post


Link to post
20 hours ago, Ren_712 said:

Not a bug. Just slice the first quarter of your image and then apply it again.

Pls bro,can u put an example,or can u explain me how to fix it?

Share this post


Link to post

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.

Edited by Ren_712

Share this post


Link to post
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?

Share this post


Link to post
16 hours ago, Ren_712 said:

no problem

Um bro sorry this isnt a question related to shaders but,how do i make the radar size bigger?

Share this post


Link to post

you can't scale gtasa radar, but i think you can find a scalable custom radar on community.

Share this post


Link to post
8 minutes ago, Ren_712 said:

you can't scale gtasa radar, but i think you can find a scalable custom radar on community.

I didnt find any :/

I got a question,whenever i change font in my scripts it doesnt work,can u help me

Share this post


Link to post

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.