Jump to content

fetchRemote


Recommended Posts

Thanks anyway, i posted that code in forum but nobody helped, hope someone see what's wrong, or just show me how i can use fetchRemote.

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" then  
local theTXD = engineLoadTXD ( theFile ) 
engineImportTXD ( theTXD, 411 ) 
elseif theFile == ":/test/cars/infernus.dff" then 
local theDFF = engineLoadDFF ( theFile, 411 ) 
engineReplaceModel ( theDFF, 411) 
 end 
 end) 

Link to comment

If its only about these 2 files, why don't you just put them in your meta so they get auto downloaded?

You can still create a function to enable/disable them or a function to delete them after they were imported if its about protection.

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...