#Kz Posted April 28, 2017 Share Posted April 28, 2017 (edited) Hi. How i can find a way to detect client resource download processing and create a message, gui and ... while it? Example: When i've connected to a server for first time, I'll download some resources, while it a warning like a message or GUI Text will be displayed like: Resource Download Process 80% which it isn't from MTA, it's created by that server development Team. I know that's easy to find but i wanna get my answer from here with some examples! [Thanks for watching this topic]. Edited April 28, 2017 by #Kz Link to comment
Fist Posted April 28, 2017 Share Posted April 28, 2017 I'm pretty sure you can't get process of download which is MTA's built-in, you have to make your own downloader for that. Not sure how to do it though, i'm guessing using fetchRemote. 1 Link to comment
3aGl3 Posted April 29, 2017 Share Posted April 29, 2017 (edited) You'll have to set all the files in the meta to download="false", so only scripts are downloaded when the player connects. As scripts are usually fairly small it shouldn't take too long. After that you'll have to make a custom downloader to load all the files. For that you will have to use the downloadFile function as well as the onClientFileDownloadComplete event. While I don't think that you can get the status of the currently downloading file you can get the progress of the overall download by getting all files sizes and working with them. Edited April 29, 2017 by 3aGl3 1 Link to comment
#Kz Posted April 29, 2017 Author Share Posted April 29, 2017 16 hours ago, Fist said: I'm pretty sure you can't get process of download which is MTA's built-in, you have to make your own downloader for that. Not sure how to do it though, i'm guessing using fetchRemote. Thanks! 2 hours ago, 3aGl3 said: You'll have to set all the files in the meta to download="false", so only scripts are downloaded when the player connects. As scripts are usually fairly small it shouldn't take too long. After that you'll have to make a custom downloader to load all the files. For that you will have to use the downloadFile function as well as the onClientFileDownloadComplete event. While I don't think that you can get the status of the currently downloading file you can get the progress of the overall download by getting all files sizes and working with them. Helpful. 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