Desync Check
#19

Quote:
Originally Posted by GoldenLion
View Post
How can I fix this then?
Here's the part of PlayerCheck, the timer repeats every second.
Code:
forward PlayerCheck();
public PlayerCheck()
{
	foreach (new i : Player)
	{		
		if (NetStats_PacketLossPercent(i) >= 0.5 && !PlayerData[i][pDesynced])
			PlayerData[i][pDesynced] = true;

		if (PlayerData[i][pDesynced])
			GameTextForPlayer(i, "~w~You are desynced~n~Please relog as soon~n~as possible", 1200, 3);
        }
}
A friend of mine runs a CoD server and he has scripted complete de-synchronization checker, I will ask him how he did that and run the timer every 5-10 seconds, packetloss doesn't increase that much in a second. Have you tried testing it on a hosted server and running some downloads or services which use internet?.

Testing code for debugging: using printf if the message is not sent.
Code:
forward PlayerCheck();
public PlayerCheck()
{
	foreach (new i : Player)
	{		
		if (NetStats_PacketLossPercent(i) >= 0.5 && !PlayerData[i][pDesynced])
			PlayerData[i][pDesynced] = true;

		if(PlayerData[i][pDesynced] && GetPlayerPing(i) >= 500)
			SendClientMessage(playerid, -1, "Lost bravo");
			printf("%d has lost bravo", i);

		if(NetStats_PacketLossPercent(i) >= 1.0)
			SendClientMessage(playerid, -1, "Lost alpha");
			printf("%d has lost alpha", i);

		if (PlayerData[i][pDesynced])
			GameTextForPlayer(i, "~w~You are desynced~n~Please relog as soon~n~as possible", 1200, 3);
			printf("%d has lost junior", i);
        }
}
Reply


Messages In This Thread
Desync Check - by GoldenLion - 09.08.2016, 15:56
Re: Desync Check - by Luicy. - 09.08.2016, 16:02
Re: Desync Check - by GoldenLion - 09.08.2016, 16:04
Re: Desync Check - by Luicy. - 09.08.2016, 16:06
Re: Desync Check - by GoldenLion - 09.08.2016, 16:09
Re: Desync Check - by Luicy. - 09.08.2016, 16:10
Re: Desync Check - by GoldenLion - 09.08.2016, 16:22
Re: Desync Check - by GoldenLion - 09.08.2016, 19:05
Re: Desync Check - by PrO.GameR - 09.08.2016, 20:30
Re: Desync Check - by GoldenLion - 10.08.2016, 12:38
Re: Desync Check - by Logic_ - 10.08.2016, 12:41
Re: Desync Check - by GoldenLion - 10.08.2016, 13:02
Re: Desync Check - by Logic_ - 10.08.2016, 13:02
Re: Desync Check - by GoldenLion - 10.08.2016, 14:36
Re: Desync Check - by Logic_ - 10.08.2016, 16:44
Re: Desync Check - by GoldenLion - 10.08.2016, 18:03
Re: Desync Check - by Logic_ - 10.08.2016, 18:12
Re: Desync Check - by GoldenLion - 10.08.2016, 18:37
Re: Desync Check - by Logic_ - 10.08.2016, 18:56
Re: Desync Check - by GoldenLion - 10.08.2016, 19:17

Forum Jump:


Users browsing this thread: 2 Guest(s)