Jump to content

Manual Download


bandi94

Recommended Posts

HY.

I completed a manual file download everything is working perfect. Now i wanna customize it with a download progress. It's working with :

fileRead 
TriggerClientEvent 
fileWrite 

Now on server side i can get the file size and number of them , but i can't figure out , how can i check the file transfer state , the function on client side will be triggered in the moment when the "TriggerClientEvent" completed sending the data from "fileRead" . Is there any way to detect how much data was sended / downloaded by the client ? Or to get the download speed and from there make the math with the file size ?

THX

Link to comment

How about you make a timer with 500 ms or 1000 ms and you make a function that sets a oldFileSizr and then when the timer is done a newFileSize you do newFileSize - oldFileSize that is how much you transfer each 500/1000 ms. If you do 500 ms multiply it with 2 to get the 1000 ms.

Hope you know what I am saying.

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...