-.Paradox.- Posted April 4, 2014 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 you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
-.Paradox.- Posted April 4, 2014 Author Posted April 4, 2014 Anyone? If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
xXMADEXx Posted April 4, 2014 Posted April 4, 2014 Does debugscript say anything? The Ultimate Lua Tutorial! | MTA PHP SDK
Bonsai Posted April 4, 2014 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
-.Paradox.- Posted April 4, 2014 Author 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.. If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
Bonsai Posted April 4, 2014 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
-.Paradox.- Posted April 5, 2014 Author 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 If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
xXMADEXx Posted April 5, 2014 Posted April 5, 2014 When the file dowloads, is it creating on the clients computer? The Ultimate Lua Tutorial! | MTA PHP SDK
-.Paradox.- Posted April 5, 2014 Author Posted April 5, 2014 No, btw I added both of the resource names on admin acl, i really don't know what's wrong.. If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
Castillo Posted April 5, 2014 Posted April 5, 2014 Use fetchRemote function, it's easier and more efficient. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
-.Paradox.- Posted April 5, 2014 Author 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 If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
-.Paradox.- Posted April 6, 2014 Author 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 If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
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