Soapbosnia Posted September 26, 2017 Posted September 26, 2017 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)
Ren_712 Posted September 26, 2017 Posted September 26, 2017 Not a bug. Just slice the first quarter of your image and then apply it again.
Soapbosnia Posted September 27, 2017 Author Posted September 27, 2017 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?
Ren_712 Posted September 27, 2017 Posted September 27, 2017 (edited) This is an example of radar disc image in hud.txd: 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 September 27, 2017 by Ren_712
Soapbosnia Posted September 27, 2017 Author Posted September 27, 2017 8 minutes ago, Ren_712 said: This is an example of radar disc image in hud.txd: 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?
Soapbosnia Posted September 27, 2017 Author Posted September 27, 2017 Just now, Ren_712 said: yes, apply shader to vehicle entity Ok bro thanks for the help
Soapbosnia Posted September 28, 2017 Author Posted September 28, 2017 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?
Ren_712 Posted September 28, 2017 Posted September 28, 2017 you can't scale gtasa radar, but i think you can find a scalable custom radar on community.
Soapbosnia Posted September 28, 2017 Author Posted September 28, 2017 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now