09-23-2013, 08:55 AM
Code:
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;
}
![[Image: Fuse.png]](http://www.upload.ee/image/872913/Fuse.png)