18.06.2015, 16:03
Just wondering if anyone knows how to detect desynced players via scripting. What would need to be put into the script, etc? Like the desynced detection script on LS-RP.
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;
}