Jump to content

Trouble with TXD replacing


Recommended Posts

I'm getting very frustrated about this TXD replacing thing. Every time i try to replace any TXD it fails without any errors or warnings. Here is my code wich is (very) simple:

office = engineLoadTXD("cj_office.txd") 
house = engineLoadTXD("sfn_office.txd") 
engineImportTXD(office, 1999) 
engineImportTXD(house, 9361) 

It worked fine before i modified the sfn_office TXD...

I'm sure i did it right because it works in single player but not in MTA.

Its also included in meta.xml of course.

Link to comment
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), 
    function() 
        local office = engineLoadTXD("cj_office.txd") 
        local house = engineLoadTXD("sfn_office.txd") 
        engineImportTXD(office, 1999) 
        engineImportTXD(house, 9361) 
    end 
) 

  • Like 1
Link to comment

It was only working some times for me, so i tried to also replace the dff for the model too at the same time, and now it works every time.

I used IMGTool to extract the dff file for the model.

(This problem only happens when trying to replace object texture).

Edited by Guest
Link to comment
Do you mean that i should "replace" the model with the original DFF of the model i'm trying to replace TXD of?

(sorry for crappy explanation :|)

Yeah, DFF and TXD.

Also, i cant find cj_office.txd in my gta san andreas. Are you sure thats the correct name for the texture?

Link to comment

Its in gta_int img. And it still doesnt work, tried this:

function replace() 
    local office = engineLoadTXD("cj_office.txd") 
    local house = engineLoadTXD("sfn_office.txd") 
    local house2 = engineLoadDFF("boatoffice_sfn.dff", 9361) 
    engineImportTXD(office, 1999) 
    engineImportTXD(house, 9361) 
    engineReplaceModel(house2, 9361) 
end 
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), replace) 

Link to comment

If the do not work = white texture then

Strangely this do not work ... because of many TXD files, 1 = ok , more = fail , do not tell me why :P

but when I do something like that it works :

addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), 
    function() 
        local office = engineLoadTXD("cj_office.txd") 
        engineImportTXD(office, 1999) 
        engineImportTXD(house, 9361) 
        local house = engineLoadTXD("sfn_office.txd") 
        engineImportTXD(office, 1999) 
        engineImportTXD(house, 9361) 
    end 
) 

Link to comment

and this !? :

addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), 
    function() 
        local office = engineLoadTXD("cj_office.txd") 
        engineImportTXD(office, 1999) 
        local house = engineLoadTXD("sfn_office.txd") 
        engineImportTXD(house, 9361) 
    end 
) 

Well its really random ... weird + I cannot find an example of multi TXD in 1 script on the wiki.

Thats suspicious !

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