Jump to content

[HELP] Get texture names of an Object


HarryDE

Recommended Posts

Posted (edited)

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
  • Moderators
Posted (edited)

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
Posted

I'm not sure what he means exactly either,
But If I'm not mistaken I think he means that he wants to know which texture applies to each wall?
If you add me on something or PM me I'll help youxD

I can do 3D vehicle/object mods and basic scripts from scratch, contact me for free help!!
Skype/Discord/Telegram: [email protected] / Justin|X5|#0977 / @JustinX5
Xtreme 5 Gaming - COMING SOON!

I'd love it if more people in MTA utilized these amazing features, so please ask me anything related to 3D modeling/basic scripting/etc.
The expert knows more and more about less and less until they know everything about nothing.

Posted
17 hours ago, JustinMTA said:

I'm not sure what he means exactly either,
But If I'm not mistaken I think he means that he wants to know which texture applies to each wall?
If you add me on something or PM me I'll help youxD

Sent you a PM :)

Posted
On 16/08/2019 at 16:32, HarryDE said:

Sent you a PM :)

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

 

Discord: its.tails

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

Posted

I thought maybe he wanted the texture ID's and I was gonna use screen share to show him.
I'm not a scripter, but I just searched on the wiki when I got back on PC and found this:
ProcessLineOfSight
Not sure if it'll work though man.

I can do 3D vehicle/object mods and basic scripts from scratch, contact me for free help!!
Skype/Discord/Telegram: [email protected] / Justin|X5|#0977 / @JustinX5
Xtreme 5 Gaming - COMING SOON!

I'd love it if more people in MTA utilized these amazing features, so please ask me anything related to 3D modeling/basic scripting/etc.
The expert knows more and more about less and less until they know everything about nothing.

  • Moderators
Posted
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

 

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

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