iPanda Posted January 30, 2014 Share Posted January 30, 2014 (edited) I want to make the background loading models for its server. The new version of the client added two functions: downloadFile and onClientFileDownloadComplete. I have nothing. While I can not understand what the problem is and how to do this function. Help make a background download. meta.xml: "iPanda" type="script" version="1.0" /> replace.lua: addEventHandler ( "onClientFileDownloadComplete", resourceRoot, function( file, success ) if ( source == resourceRoot ) then if ( success ) then if ( file == "data/model.txd" and "data/model.dff" ) then TXD = engineLoadTXD ( "data/model.txd" ) engineImportTXD ( TXD, 476 ) DFF = engineLoadDFF ( "data/model.dff", 476 ) engineReplaceModel ( DFF, 476 ) end end end end) What I want to get: If a player does not use the car, so he does not need this machine, therefore the model of the machine it is also not necessary. Under the background downloading, I think the download of a particular model when the player uses it during the game, otherwise it does not need and does not load the player model. Edited January 30, 2014 by Guest Link to comment
.:HyPeX:. Posted January 30, 2014 Share Posted January 30, 2014 You have not downloaded the files, so it will not work. (since you did download="false") Link to comment
Bonsai Posted January 30, 2014 Share Posted January 30, 2014 Afaik this new function and the event will be part of 1.4, so they aren't available yet. Link to comment
iPanda Posted January 30, 2014 Author Share Posted January 30, 2014 You have not downloaded the files, so it will not work. (since you did download="false")If you remove download="false", then I will not make the background download my files will swing at the entrance to the server. ps. Later I removed download="false". Still does not work. Afaik this new function and the event will be part of 1.4, so they aren't available yet. 1.3.4. already out. Link to comment
Karuzo Posted January 30, 2014 Share Posted January 30, 2014 https://wiki.multitheftauto.com/wiki/DownloadFile i don't think so. Link to comment
Dealman Posted January 30, 2014 Share Posted January 30, 2014 1.3.4. already out. 1.3.4 is not 1.4... It's not officially released yet, I've no idea why the developers think it's a good idea to delay it all the way to 1.4. You can however download this resource. Basically does the same thing. 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