Jump to content

[Help] Object Textures White


Recommended Posts

If you don't have textures and model don't use one of the built-in then obviously they are white, can you give me SAMP objects ID's of those models?

Edited by gubi
Link to post
4 minutes ago, gubi said:

If you don't have textures and model don't use one of the built-in then obviously they are white, can you give me SAMP objects ID's of those models?

CombatableIncognisantCottontail.png

Link to post

You need to include also .TXD from SA-MP files (gta3.img as far as i remember). For example for object 'MBridge150m1.dff' you need cs_ebridge.txd, you can check which TXD you need by typing model name/id over here. , fe. MBridge150m1

Link to post

A lot of SAMP objects are made to load their textures from .txd files inside of gta3.img of your GTA SA installation, therefore you'll have to extract that from your game files and not from SAMP files.
The .txd files stored in samp.img are usually only for models that makes use of custom textures, or for textures cut down to lower dimensions than their originals, like a SWAT helmet, its GTA texture is 256x512, so SAMP would ideally make a custom .txd that's 32x32 because the helmet is that small on the image.

38 minutes ago, MatreN said:

i try to

it did not work @gubi

Can you please describe what you tried, optionally in steps, so that we can verify that you were doing it correctly?

Link to post

1. I extract cs_ebridge.txd from the gta3.img file and changed the name of the file, I did Example MRoadTwist15DegR.txd.
2. And then I wrote it into meta.xml and scripts.lua.

I then tried it in another way.
MRoadTwist15DegR.col
MRoadTwist15DegR.dff
cs_ebridge.txd
I tried as. But it didn't work.

Link to post

Ok, I can confirm it's an issue on your end. It might be a scripting issue, in which case you won't find much advise from me. I can however recommend you load in the following order; COL; TXD; DFF. If it's loaded in another order, I believe it won't load correctly.
You can read more about that on the function page and its notes: https://wiki.multitheftauto.com/wiki/EngineReplaceModel

mta-screen_2020-08-01_18-02-20.png

Edited by Tut
correcting misleading information
Link to post
1 minute ago, MatreN said:

its working, but it goes through the object. @Tut

In what sense? I don't understand the problem.

Link to post
1 minute ago, Tut said:

In what sense? I don't understand the problem.

The collision on the object is true, but it is passed through inside the object.

function replaceObject() 
    txd = engineLoadTXD ( "MRoadTwist15DegR.txd" )
    engineImportTXD ( txd, 4150)
    dff = engineLoadDFF ( "MRoadTwist15DegR.dff", 4150)
    engineReplaceModel ( dff, 4150)
    col = engineLoadCOL( "MRoadTwist15DegR.col", 4150)
    engineReplaceCOL ( dff, 4150)

    end
    addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceObject)

 

Link to post
On 01/08/2020 at 18:26, MatreN said:

The collision on the object is true, but it is passed through inside the object.


function replaceObject() 
    txd = engineLoadTXD ( "MRoadTwist15DegR.txd" )
    engineImportTXD ( txd, 4150)
    dff = engineLoadDFF ( "MRoadTwist15DegR.dff", 4150)
    engineReplaceModel ( dff, 4150)
    col = engineLoadCOL( "MRoadTwist15DegR.col", 4150)
    engineReplaceCOL ( dff, 4150)

    end
    addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceObject)

 

I would assume you would exchange the ( dff, 4150) with ( col, 4150)? It's the only logical thing I can see even though I'm not a programmer.

    col = engineLoadCOL( "MRoadTwist15DegR.col", 4150)
    engineReplaceCOL ( dff, 4150)

I would also recommend you follow the loading structure that I described above, which would be COL -> TXD -> DFF. Your structure is TXD -> DFF -> COL, so that might be an issue, but then again I'm not a programmer so I'd rather not represent myself as a good source of knowledge on that part.

Edited by Tut
correcting misleading information
Link to post
3 hours ago, Tut said:

I would assume you would exchange the ( dff, 4150) with ( col, 4150)? It's the only logical thing I can see even though I'm not a programmer.


    col = engineLoadCOL( "MRoadTwist15DegR.col", 4150)
    engineReplaceCOL ( dff, 4150)

I would also recommend you follow the loading structure that I described above, which would be TXD -> COL -> DFF. Your structure is TXD -> DFF -> COL, so that might be an issue, but then again I'm not a programmer so I'd rather not represent myself as a good source of knowledge on that part.

Afaik the right order is: COL -> TXD -> DFF.

Link to post
5 minutes ago, majqq said:

Afaik the right order is: COL -> TXD -> DFF.

Yeah that's what I use. Thanks for the correction :thumbright:

  • Like 1
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...