Jump to content

MTA 1.3.4 downloadFile


iPanda

Recommended Posts

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 by Guest
Link to comment
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

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