Xierra Posted March 21, 2010 Share Posted March 21, 2010 Hi guys! I just now downloaded Shanghai International Speedway and I found things inside the .img There is around 4 dff items, but only one txd. Can you tell me how to properly import these? Script: function replaceDFF() dff=engineLoadDFF("hjp03.txd") engineImportDFF(dff, 3914) dff1=engineLoadDFF("hjp04a.dff") engineImportDFF(dff1, 3911) dff2=engineLoadDFF("hjp04b.dff") engineImportDFF(dff2, 3910) dff3=engineLoadDFF("hjp04c.dff") engineImportDFF(dff3, 3906) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceDFF) function replaceTXD() txd = engineLoadTXD("chinaspeed.txd") engineImportTXD(txd, 9482) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceTXD) Link to comment
50p Posted March 21, 2010 Share Posted March 21, 2010 model_id: The model id that should be associated with the dff, when loading a vehicle. Always specify 0 if you are replacing something else than a vehicle. Where did you find engineImportDFF? Such function doesn't exist unless you created it in your script. If you have only one txd that probably means it's a shared texture and can be used with all of the .dffs you have. Load texture once and import it for different models. Like so: dff = engineLoadDFF( "hjp03.dff", 0); engineReplaceModel( dff, 3914 ); dff = engineLoadDFF( "hjp04a.dff", 0 ); engineReplaceModel( dff, 3911 ); dff = engineLoadDFF( "hjp04b.dff", 0 ); engineReplaceModel( dff, 3910 ); dff = engineLoadDFF( "hjp04c.dff", 0 ); engineReplaceModel( dff, 3906 ); txd = engineLoadTXD( "chinaspeed.txd" ); engineImportTXD( txd, 3906 ); engineImportTXD( txd, 3910 ); engineImportTXD( txd, 3911 ); engineImportTXD( txd, 3914 ); Link to comment
Xierra Posted March 22, 2010 Author Share Posted March 22, 2010 Sorry, forgotten which code I should use. That's because I'm using Windows Notepad for a while, sorry. Thanks 50p! Great now I will try making custom maps from most websites and I'll post it on MTA community after I made it. Link to comment
Xierra Posted March 23, 2010 Author Share Posted March 23, 2010 Hey guys I made this to work, but no textures and too low LOD distance. How to do it? Link to comment
50p Posted March 23, 2010 Share Posted March 23, 2010 LOD can't be greater than 500. If it's lower than that and you want it to be 500, you can set it with engineSetModelLODDistance. If textures aren't loaded, load them again. It's been said many time on this forum... You can make a function to load textures and players can call it when textures need to be reloaded (can be onClientResourceStart or command or both). Link to comment
Xierra Posted March 24, 2010 Author Share Posted March 24, 2010 I already know about the white textures, but I already tried to restart it many times, but still white... why? (oh yeah, I loaded it on Map Editor. Added col) Link to comment
50p Posted March 24, 2010 Share Posted March 24, 2010 I already know about the white textures, but I already tried to restart it many times, but still white... why?(oh yeah, I loaded it on Map Editor. Added col) No idea. It happens to everyone, even after restarting client or reconnecting. You have to keep trying. Also, make sure your .txd has a texture that model asks for. You can use TXD Workshop to do that. 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