Jump to content

Unified Textures


BabY

Recommended Posts

Hello Community,

I'm tring to replace some textures for one object only, I tried to search for some codes to do that, but I'm lucky.

Theres a way to replace DFF\TXD for only one object only ?

Example : object = createObject (ID, bla, bla, bla, anotherBla, anotherBla, anotherBla)

and set the ID to a custom file (.dff, .txd) ?

Link to post

Objects themselves don't directly have DFFs/TXDs. Their IDs (which are numbers) do. All objects with the same ID will have the same DFF/TXD at the same time. However, because of the way MTA handles custom models, they can be replaced/restored during the game. So if you replace the model when the object is streamed in and restore when it's streamed out, with no other objects with the same ID being nearby, you will have an object with unique model.

Link to post

Streaming in/out basically just means whether the object exists for the player or not - whether the player is within stream distance of the object. Stream distance (usually 300m radius or less) is the distance at which a spawned object becomes visible to the player, or in the case of native map objects with LODs (low-poly version you see from far away), it is the distance at which the LOD disappears and the DFF appears.

Link to post

So CrystalMV means that I should use

isElementStreamedIn 

and

if not isElementStreamedIn 

when replacing the .dff and .txd ?

Or just replace the object which I replaced it's ID far than same ID of the object I replaced ?

Simple way :

What I mean is if I did what Crystal means so

That will be right

(Object I replaced) ------------------------------------------------------------------------- (Object with same ID)

And that will be wronge ?

(Objet I replaced) ----------------------- (Object with same ID)

Link to post

Yes, you need to make sure that no objects with the same model ID are near. And it's better to do replace/restore model onClientElementStreamIn/onClientElementStreamOut.

Stream distance (usually 300m radius or less) is the distance at which a spawned object becomes visible to the player, or in the case of native map objects with LODs (low-poly version you see from far away), it is the distance at which the LOD disappears and the DFF appears.

That's not right. The object may be streamed in even if it's too far to be visible. 'Streamed in' means that the object is physically present in GTA world. When it's streamed out, it gets removed from the game and only exists in MTA memory.

Link to post

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