^.^ Posted March 14, 2013 Posted March 14, 2013 Hello Community, I am working on a loading system for downloading files. Sometimes when I download music or textures via the system I get network trouble. That's the line for triggering the event to the server. triggerLatentServerEvent("startFileDownload", 900000, getLocalPlayer(), serverFile, clientFile, gameModeID) I am downloading files at a size of about 3-4 MB. Thanks for your help
novo Posted March 14, 2013 Posted March 14, 2013 Take a look to this resource: https://community.multitheftauto.com/index.php?p= ... ls&id=3379 It's easy to use; downloadFile(serverFile, clientFile, interval) -- interval isn't needed, if you want it to go as faster possible set it to 50.
Castillo Posted March 14, 2013 Posted March 14, 2013 That resource will cause the same problem as he mentioned, I know this because it happened on my server, and so far, couldn't find a way to fix this, so maybe you should wait for the MTA downloadFile function.
Anderl Posted March 15, 2013 Posted March 15, 2013 That happens because you trigger an event many times with much data (not really sure about it). It may get solved if you make a delay between each trigger.
^.^ Posted March 15, 2013 Author Posted March 15, 2013 Well Thanks for your answers. Anderl you brought me to an idea.
^.^ Posted March 19, 2013 Author Posted March 19, 2013 I thought the solution would be more difficult. At the end all files get downloaded within some seconds without a timeout.
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