3B00DG4MER Posted March 13, 2014 Share Posted March 13, 2014 (edited) Hello,I made today a Command which Can Download the Model,Vehicles,Weapons,Skins When you do the Command /download,it should be start downloading the Model,But It's not work Help please Meta: "false" src="fortune.dff"/> "false" src="fortune.txd"/> Client: function downloadfile() outputChatBox ( "The Download has started" ) downloadFile ( "fortune.txd" ) downloadFile ( "fortune.dff" ) end addCommandHandler ( "download", downloadfile ) function onDownloadFinish ( file, success ) if ( source == resourceRoot ) then -- if the file relates to this resource if ( success ) then -- if the file was downloaded successfully if ( file == "fortune.txd" ) and ( file == "fortune.dff" ) then -- if the file name is what we were expecting outputChatBox ( "the file has succesfully finnised " ) txd = engineLoadTXD ( "fortune.txd" ) engineImportTXD ( txd, 526 ) dff = engineLoadDFF ( "fortune.dff", 526 ) engineReplaceModel ( dff, 526 ) end else -- if the file wasn't downloaded successfully if ( file == "fortune.txd" ) and ( file == "fortune.dff" ) then outputChatBox ( "fortune failed to download" ) end end end end addEventHandler ( "onClientFileDownloadComplete", getRootElement(), onDownloadFinish ) Error: client.lua:3: attempt to call global 'downloadFile' (a nil value) Edited March 15, 2014 by Guest Link to comment
Castillo Posted March 13, 2014 Share Posted March 13, 2014 downloadFile function is not yet added, it's supposed to be added in MTA 1.4. Link to comment
3B00DG4MER Posted March 13, 2014 Author Share Posted March 13, 2014 Why then CIT2 Server is using it ?! Link to comment
pa3ck Posted March 13, 2014 Share Posted March 13, 2014 Why then CIT2 Server is using it ?! They aren't. They are using other function(s). Link to comment
Castillo Posted March 13, 2014 Share Posted March 13, 2014 I guess they are using fetchRemote, as my server also does. Link to comment
3B00DG4MER Posted March 13, 2014 Author Share Posted March 13, 2014 Thank you very Much #Solidsnake14 for the command fetchRemote Can you fix it (Add it in My script please) !!! And I'll be thankful Link to comment
Sasu Posted March 13, 2014 Share Posted March 13, 2014 https://community.multitheftauto.com/ind ... ls&id=3379 Link to comment
Castillo Posted March 13, 2014 Share Posted March 13, 2014 fetchRemote is easier and more efficient to use in my opinion. Link to comment
xXMADEXx Posted March 13, 2014 Share Posted March 13, 2014 (Just incase: It might be even easier to use this resource, but you need to be able to port forward) Link to comment
3B00DG4MER Posted March 14, 2014 Author Share Posted March 14, 2014 Thanks,I have Port forward from the begining Link to comment
xXMADEXx Posted March 14, 2014 Share Posted March 14, 2014 Thanks,I have Port forward from the begining Make sure to read the forum topic Link to comment
3B00DG4MER Posted March 14, 2014 Author Share Posted March 14, 2014 i read it,I test you script Updates ad Mods System They work perfectly and easy 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