14.09.2013, 18:18
pawn Код:
stock Float:GetPlayerPacketLoss(playerid)
{
new stats[401], stringstats[70];
GetPlayerNetworkStats(playerid, stats, sizeof(stats));
new len = strfind(stats, "Packetloss: ");
new Float:packetloss = 0.0;
if(len != -1) {
strmid(stringstats, stats, len, strlen(stats));
new len2 = strfind(stringstats, "%");
if(len != -1) {
strdel(stats, 0, strlen(stats));
strmid(stats, stringstats, len2-3, len2);
packetloss = floatstr(stats);
}
}
return packetloss;
}
Код:
warning 208: function with tag result used before definition, forcing reparse