Jump to content

[SOLVED]Change radar arrow


Gun22

Recommended Posts

Hi!

Próbálkozom a radart átshaderezni, eddig lecseréltem a hátterét, de a nyílra nem jöttem rá, hogyan kell/lehet kicserélni.

I'm trying change the shader of radar, I has changed the background, but I didn't realize how can I replace arrow.

So far I tried this:

local shader = dxCreateShader ( "shader.fx" ) 
local texture = dxCreateTexture ( "arrow.png" ) 
engineApplyShaderToWorldTexture ( shader, "arrow" ) 
dxSetShaderValue ( shader, "gTexture", texture ) 

This is in an other script, but it doesn't work.

Edited by Guest
Link to comment

If you're editing a radar resource then simply replace original .png file with yours. If you want to replace the player icon of the default GTA:SA radar then you have to change "arrow" to "radar_player".

Link to comment

Thanks, but it doesn't work...

My code is:

local texturesimg = { 
    {"radar_img/arrow.png", "radar_player"} 
} 
  
addEventHandler( "onClientResourceStart", resourceRoot, 
    function() 
        for i=1, #texturesimg do  
            local shader = dxCreateShader( "radar_shader.fx" ) 
            engineApplyShaderToWorldTexture ( shader, texturesimg[i][2] ) 
            dxSetShaderValue ( shader, "gTexture", dxCreateTexture(texturesimg[i][1]) ) 
        end 
         
    end 
) 

And the picture:

a1_2014_4_25_e9pjd5pc2n.bmp

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