-.Paradox.- Posted April 4, 2014 Share Posted April 4, 2014 Hello guys, it's me again, I was searching in the forum for a way to download some files after client finish the current mta download, so I found this script https://community.multitheftauto.com/index.php?p= ... ls&id=3379 and I followed the instrunction but it isn't working, here is what I tried addEventHandler ("onClientResourceStart", getResourceRootElement(getThisResource ()), function () exports.download:downloadFile ("infernus.txd", "infernus.txd", 500) exports.download:downloadFile ("infernus.dff", "infernus.dff", 500) end) addEventHandler ("onClientDownloadComplete", getRootElement(), function (theFile) if theFile == ":/test/cars/infernus.txd" and theFile == ":/test/cars/infernus.dff" then local theTXD = engineLoadTXD ( theFile ) engineImportTXD ( theTXD, 411 ) local theDFF = engineLoadDFF ( theFile, 411 ) engineReplaceModel ( theDFF, 411) end end) P.S: I added both of the resources in admin acl, and I make sure that it's running, I hope somebody help, thanks. Link to comment
xXMADEXx Posted April 4, 2014 Share Posted April 4, 2014 Does debugscript say anything? Link to comment
Bonsai Posted April 4, 2014 Share Posted April 4, 2014 Hello guys, it's me again, I was searching in the forum for a way to download some files after client finish the current mta download, so I found this script https://community.multitheftauto.com/index.php?p= ... ls&id=3379 and I followed the instrunction but it isn't working, here is what I tried addEventHandler ("onClientResourceStart", getResourceRootElement(getThisResource ()), function () exports.download:downloadFile ("infernus.txd", "infernus.txd", 500) exports.download:downloadFile ("infernus.dff", "infernus.dff", 500) end) addEventHandler ("onClientDownloadComplete", getRootElement(), function (theFile) if theFile == ":/test/cars/infernus.txd" and theFile == ":/test/cars/infernus.dff" then local theTXD = engineLoadTXD ( theFile ) engineImportTXD ( theTXD, 411 ) local theDFF = engineLoadDFF ( theFile, 411 ) engineReplaceModel ( theDFF, 411) end end) P.S: I added both of the resources in admin acl, and I make sure that it's running, I hope somebody help, thanks. if theFile == ":/test/cars/infernus.txd" and theFile == ":/test/cars/infernus.dff" then I guess it can't be both at the same time Link to comment
-.Paradox.- Posted April 4, 2014 Author Share Posted April 4, 2014 Just a typo it is actually like this if theFile == ":/test/cars/infernus.txd" and ":/test/cars/infernus.dff" then and both of them aren't working. xXMADEXx Nothing in debug.. Link to comment
Bonsai Posted April 4, 2014 Share Posted April 4, 2014 Just a typo it is actually like thisif theFile == ":/test/cars/infernus.txd" and ":/test/cars/infernus.dff" then and both of them aren't working. xXMADEXx Nothing in debug.. That looks even more weird Shouldn't it be like: if theFile == ":/test/cars/infernus.txd" then local theTXD = engineLoadTXD ( theFile ) engineImportTXD ( theTXD, 411 ) elseif theFile == ":/test/cars/infernus.dff" then local theDFF = engineLoadDFF ( theFile, 411 ) engineReplaceModel ( theDFF, 411) end Link to comment
-.Paradox.- Posted April 5, 2014 Author Share Posted April 5, 2014 Warning:download/server fileOpen unable to load file Files path: cars/infernus.txd cars/infernus.dff cars/meta.XML And the here is the path of download resource download/client.lua download/server.lua download/meta.xml Link to comment
xXMADEXx Posted April 5, 2014 Share Posted April 5, 2014 When the file dowloads, is it creating on the clients computer? Link to comment
-.Paradox.- Posted April 5, 2014 Author Share Posted April 5, 2014 No, btw I added both of the resource names on admin acl, i really don't know what's wrong.. Link to comment
Castillo Posted April 5, 2014 Share Posted April 5, 2014 Use fetchRemote function, it's easier and more efficient. Link to comment
-.Paradox.- Posted April 5, 2014 Author Share Posted April 5, 2014 I have no idea how to use it, so i search in community and i found that resource.. Is there any topic that have the same problem? or explain how to use fetchRemote Link to comment
-.Paradox.- Posted April 6, 2014 Author Share Posted April 6, 2014 When the file dowloads, is it creating on the clients computer? I was missing around, and i was wrong it's creating on clients computers, but it don't apply the modded infernus 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