packet loss help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: packet loss help (
/showthread.php?tid=626955)
packet loss help -
JuzDoiT - 22.01.2017
anyone know how to add packet loss like ping or fps
Re: packet loss help -
ThatFag - 22.01.2017
Код:
new str[350];
GetPlayerNetworkStats(playerid, str, sizeof(str));
new start = strfind(str, "Packetloss", false);
strmid(str, str, start + 12, strfind(str, "Messages", false, start) - 2);
new Float:packetloss = floatstr(str);
then make a textdraw under that ping or whatever also not sure if it works about the codes not tested.
Re: packet loss help -
Vince - 22.01.2017
Quote:
Originally Posted by Drakey
I'm sure your packetloss is basically your ping
|
Absolutely not. Ping is the amount of milliseconds it takes for a packet to travel from the origin to the destination, e.g. a ping of 121 means it takes 121 milliseconds to transfer a packet. Packetloss, on the other hand is when packets are lost on-route to the destination, i.e. they don't arrive at all. A packetloss percentage of 0.0% is ideal because that means all packets arrive. Anything else is a cause for concern. Below 2.5% is still somewhat acceptable, anything else is bad and will affect the quality of the connection significantly.
Re: packet loss help -
JuzDoiT - 22.01.2017
Quote:
Originally Posted by ThatFag
Код:
new str[350];
GetPlayerNetworkStats(playerid, str, sizeof(str));
new start = strfind(str, "Packetloss", false);
strmid(str, str, start + 12, strfind(str, "Messages", false, start) - 2);
new Float:packetloss = floatstr(str);
then make a textdraw under that ping or whatever also not sure if it works about the codes not tested.
|
i will use it onplayerupdate?