Jump to content

Moon


Timiimit

Recommended Posts

Posted

I saw a resource in community called "nyan". I would like to know how to replace the moon like resource does.

btw i tried to figure out how to, but i have no clue!

Can anyone tell me how to do that but only to replace the moon with one img?

Posted

You can use a shader.

Download this resosurce: https://community.multitheftauto.com/index.php?p= ... ls&id=2730

It contains a shader called "texreplace.fx". Add that shader as a "file" in your meta.xml, along with the png image you wish to use for the moon, then use this code in a client-sided script to replace the moon:

  
texShader = dxCreateShader ( "texreplace.fx" ) 
moonTexture = dxCreateTexture("yourMoonImage.png") -- Replace the filename to your image's file obviously 
  
dxSetShaderValue(texShader,"gTexture",moonTexture) 
  
engineApplyShaderToWorldTexture(texShader,"coronamoon") 
  

Enjoy.

Posted
You cant replac it with an image.

You have to use txd.

WRONG

You can replace it with images, just set the same name.

I didn't download the resource, so i couldn't know that he wants to replace the pictures IN it.

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