Jump to content

[HELP] Get texture names of an Object


HarryDE

Recommended Posts

So there is the situation:

There is a wall object that has 4 different textures applied on different side of the object and I would have to get which side of the wall the player is hovering with the cursor. Is there any solution for it?

Edited by HarryDE
Link to comment
  • Scripting Moderators

I am afraid that it is an unsolvable question with only object. First, there is no way to get the texture from an object by position. Second, we can not get the texture from an object even you know which face of the object the mouse clicks without analyzing the dff file. But you can store the texture data in a table ....

Edited by thisdp
Link to comment
6 hours ago, Tails said:

Instead of sending a PM, please clarify it here in this thread, so others can help too such as myself.

 

I explained him the problem better but actually he couldn't even help. :S

But I can copy here my explanation that I have written in my PM.

So I have a wall object that has 4 different textures. As this pictures shows: https://imgur.com/CSJBkSU ( Texture names: la_carp3, la_carp4, la_carp5, la_carp6 ) I checked them with shader_tex_names resource from MTA Wiki. But I'd have to get the name of the texture that I click on. For example, I click on the right side of the wall object then the function gives as result: la_carp3. 

Link to comment
  • Moderators
3 minutes ago, HarryDE said:

Any Ideas ? Because I still can't solve it ?

Hovering is probably not possible.

 

But you can get from each object it's texture names, based on the model id.

https://wiki.multitheftauto.com/wiki/EngineGetModelTextureNames

 

Or on screen: (+ filter option based on model id)

https://wiki.multitheftauto.com/wiki/EngineGetVisibleTextureNames

 

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