Skip to content

ReplaceTexture

Replace a texture

Argument Data Type Needed Default Description
dict string - The dict to replace the texture
Texture Name string - The original texture name, you can found it with OpenIV
Url string - The url of the texture, can be a: .gif, .png, .jpg or a website (it can also be a nui)
Width number - The width of the texture
Height number - The height of the texture

Dont need to be called every frame


Example

ReplaceTexture("v_corp_facebeanbagd", "km_xj_v_beanbag", "https://gifer.com/en/embed/SBMP", 300, 300)

If dont start click me

How to find the texture name

Download OpenIV and setup it (follow the video until 3:50)


When you are on OpenIV turn on the Edit Mode (in the top-right) https://i.postimg.cc/bJCzv82r/image.png

Click Yes


Ok, search the model name of the prop you want to find the texture name, for the tutorial i use this prop: v_corp_facebeanbagd
https://i.postimg.cc/26KDDwPB/image.png

And click Search "v_corp_facebeanbagd" https://i.postimg.cc/rphmD5Bq/image.png

Wait that OpenIV search in the all directory the prop you have choose and then double click on the v_corp_facebeanbagd.ydr or v_corp_facebeanbagd.yft


For me is a ydr
https://i.postimg.cc/yYzVYfDF/image.png


Ok, now open the file, a model will show up https://i.postimg.cc/2y0TJcJP/image.png

Click on View embedded textures in the bottom-right


Some texture will show up, you need to choose the right texture, for me there is only one https://i.postimg.cc/vDRDQMp9/image.png

So, we have finished, km_xj_v_beanbag is the textureName and v_corp_facebeanbagd is the dict


Last update: June 6, 2023
Created: June 27, 2021