marcineg Posted May 5, 2017 Share Posted May 5, 2017 Hi, how to get server resource size and what are we downloading? I mean something like this is progressbar during download and is xMB downloaded from xMB for download XMB / xMB Sorry for my English, I'm Polish. Link to comment
1B0Y Posted May 6, 2017 Share Posted May 6, 2017 As far as I am aware, there's no function available to calculate the total size of client resources that will be downloaded when the player joins the server. However, you can calculate this by looping through all the resources of the server, then parsing the client files from the meta and then calculating the size of each file to come up with a total with the use of the File functions. Give it a try Link to comment
Ayush Rathore Posted May 6, 2017 Share Posted May 6, 2017 (edited) 8 hours ago, marcineg said: Hi, how to get server resource size and what are we downloading? I mean something like this is progressbar during download and is xMB downloaded from xMB for download XMB / xMB Sorry for my English, I'm Polish. https://community.multitheftauto.com/index.php?p=resources&s=details&id=12448 this resource might help you Edited May 6, 2017 by Ayush Rathore Link to comment
undefined Posted May 6, 2017 Share Posted May 6, 2017 Use fileGetSize function. If you use this on client, it returns your downloaded file size; if you use it on server, it returns total file size. 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