Mickoi Posted February 20, 2023 Share Posted February 20, 2023 Hi, is there any function in mta returns network speed? For example, i need to show play his network speed at the moment for example 30MB/s, some help? Link to comment
FernandoMTA Posted February 20, 2023 Share Posted February 20, 2023 10 minutes ago, Mickoi said: Hi, is there any function in mta returns network speed? For example, i need to show play his network speed at the moment for example 30MB/s, some help? I dont think so, but there is this: https://wiki.multitheftauto.com/wiki/GetNetworkStats Link to comment
Mickoi Posted February 20, 2023 Author Share Posted February 20, 2023 Yeah i saw this one but i dont know how to get download speed whne downloading files on server I saw this once on server so it is possible Link to comment
Nitride Posted February 21, 2023 Share Posted February 21, 2023 I'd say use a timer to check the change in bytesReceived (From GetNetworkStats) since the previous frame and then divide by the sample time to calculate the Megabits (or Megabytes) per second. Perhaps have a look at the example for average packet loss in https://wiki.multitheftauto.com/wiki/GetNetworkStats which may point you in the right direction. 1 Link to comment
Nitride Posted March 4, 2023 Share Posted March 4, 2023 (edited) @Mickoi Have you found a solution yet? I made something in my spare time. Not bad for my first script Screenshot of POC. I still want to make the UI look interesting and add configuration options. https://drive.google.com/file/d/1Bw_qJJwRBiQ7Vla15uQJTk1Fh5P6qX0d/view?usp=share_link Edited March 4, 2023 by Nitride 1 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