BabY Posted July 27, 2011 Share Posted July 27, 2011 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 comment
DiSaMe Posted July 28, 2011 Share Posted July 28, 2011 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 comment
BabY Posted July 30, 2011 Author Share Posted July 30, 2011 Excuse me, I hear "Stream" alot.. but I don't know what it means.. What's the meaning of Stream in and Stream out ? Link to comment
Oz. Posted July 30, 2011 Share Posted July 30, 2011 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 comment
BabY Posted July 30, 2011 Author Share Posted July 30, 2011 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 comment
DiSaMe Posted July 30, 2011 Share Posted July 30, 2011 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 comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now