3B00DG4MER Posted March 13, 2014 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
Castillo Posted March 13, 2014 Posted March 13, 2014 downloadFile function is not yet added, it's supposed to be added in MTA 1.4.
pa3ck Posted March 13, 2014 Posted March 13, 2014 Why then CIT2 Server is using it ?! They aren't. They are using other function(s).
Castillo Posted March 13, 2014 Posted March 13, 2014 I guess they are using fetchRemote, as my server also does.
3B00DG4MER Posted March 13, 2014 Author 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
Sasu Posted March 13, 2014 Posted March 13, 2014 https://community.multitheftauto.com/ind ... ls&id=3379
Castillo Posted March 13, 2014 Posted March 13, 2014 fetchRemote is easier and more efficient to use in my opinion.
xXMADEXx Posted March 13, 2014 Posted March 13, 2014 (Just incase: It might be even easier to use this resource, but you need to be able to port forward)
3B00DG4MER Posted March 14, 2014 Author Posted March 14, 2014 Thanks,I have Port forward from the begining
xXMADEXx Posted March 14, 2014 Posted March 14, 2014 Thanks,I have Port forward from the begining Make sure to read the forum topic
3B00DG4MER Posted March 14, 2014 Author Posted March 14, 2014 i read it,I test you script Updates ad Mods System They work perfectly and easy
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