Gun22 Posted April 25, 2014 Posted April 25, 2014 (edited) 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 April 26, 2014 by Guest
50p Posted April 25, 2014 Posted April 25, 2014 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".
Gun22 Posted April 25, 2014 Author Posted April 25, 2014 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:
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