Jump to content

Download


Recommended Posts

Posted

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.

Posted

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.

Posted
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 :o

Posted

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.

Posted
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..

That looks even more weird :o

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 
  

Posted

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.

Posted

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.

Posted

Use fetchRemote function, it's easier and more efficient.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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.

Posted
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.

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...