megaman54 Posted April 2, 2012 Share Posted April 2, 2012 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
myonlake Posted April 2, 2012 Share Posted April 2, 2012 addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function() local office = engineLoadTXD("cj_office.txd") local house = engineLoadTXD("sfn_office.txd") engineImportTXD(office, 1999) engineImportTXD(house, 9361) end ) 1 Link to comment
megaman54 Posted April 2, 2012 Author Share Posted April 2, 2012 Hmm still not working. Link to comment
Castillo Posted April 2, 2012 Share Posted April 2, 2012 File path is right? script is set as client side? Link to comment
megaman54 Posted April 2, 2012 Author Share Posted April 2, 2012 Yea file path is correct and its client side. It worked before i modified the TXD, like i said in the first post. But i'm sure the TXd is correct as it works in single player. Link to comment
arezu Posted April 2, 2012 Share Posted April 2, 2012 (edited) 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 April 2, 2012 by Guest Link to comment
megaman54 Posted April 2, 2012 Author Share Posted April 2, 2012 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 ) Link to comment
arezu Posted April 2, 2012 Share Posted April 2, 2012 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
megaman54 Posted April 2, 2012 Author Share Posted April 2, 2012 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
Faw[Ful] Posted April 2, 2012 Share Posted April 2, 2012 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 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
megaman54 Posted April 2, 2012 Author Share Posted April 2, 2012 sfn_office.txd works now. But the cj_office.txd doesnt work anymore ?? What da hell?!.. Seems like when the other one works the other doesnt work. Link to comment
Faw[Ful] Posted April 2, 2012 Share Posted April 2, 2012 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
megaman54 Posted April 2, 2012 Author Share Posted April 2, 2012 Got it working now... i think... Had to do the following: shutdown mta client, go to the mods folder of client, delete the script from there and then reconnect to server. I have to do this everytime i mod something??! Not fun... 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