Get packet loss
#1

Hi,

This function is good check for packet loss?

Код:
stock GetPlayerPacketloss(playerid,&Float:packetloss)
{
	/* Returns the packetloss percentage of the given playerid - Made by Fusez */

	if(!IsPlayerConnected(playerid)) return 0;

	new nstats[400+1], nstats_loss[20], start, end;
	GetPlayerNetworkStats(playerid, nstats, sizeof(nstats));

	start = strfind(nstats,"packetloss",true);
	end = strfind(nstats,"%",true,start);

	strmid(nstats_loss, nstats, start+12, end, sizeof(nstats_loss));
	packetloss = floatstr(nstats_loss);
	return 1;
}
Reply
#2

Perhaps it used to be prior to 0.3z, when NetStats_PacketLossPercent was added. Research!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)