server have a high ping
#1

hi when my server has > 80 players all players has a higher ping what they should have.

example i must have a ping of 70 and have mostly a ping of 120. not only I have 120 ping, lot of other have exact the same ping as I. It switchts from high ping to normal ping. But when they are 30 players connect all works fine.

I have goggles debug in OnPlayerUpdate, but more not:

Код:
public OnPlayerUpdate(playerid)
{
	//Goggles debug
	switch(GetPlayerWeapon(playerid))
	{
	  case 44, 45:
	  {
	    new keys, ud, lr;
	    GetPlayerKeys(playerid, keys, ud, lr);
	    if((keys & KEY_FIRE) && (!IsPlayerInAnyVehicle(playerid)))
			{
			  return 0;
			}
		}
	}
	return 1;
}
Reply
#2

OnPlayerUpdate updates dates 30-70/ sec. It means when a lot of players are playing on your server it will lag and normally have a high ping.
Delete OnPlayerUpdate and try to create a Timer for your settings.
It will resolve the problem.
Reply
#3

Is it home hosted? Usually you cannot take that many people on a server that is not professionally hosted, due to the fact that the internet is too slow/etc.
Try this to see if your internet is okay.

Edit:
Quote:
Originally Posted by Flashy
OnPlayerUpdate updates dates 30-70/ sec. It means when a lot of players are playing on your server it will lag and normally have a high ping.
Delete OnPlayerUpdate and try to create a Timer for your settings.
It will resolve the problem.
His code shouldn't make a problem, because it is not that long. If there is not more in OnPlayerUpdate it should be okay, due the usage of switch-case.
Reply
#4

off course is on a root.

bandwith: 65 GBit
Reply
#5

Please help..
I tried to do that in onplayerkeystate, didnt work (for sure).
seems that onplayerupdate is the only way to block it since setplayerdisabledweapons is removed >.<
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)