server have a high ping - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: server have a high ping (
/showthread.php?tid=155251)
server have a high ping -
Headshot1108 - 17.06.2010
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;
}
Re: server have a high ping -
Flashy - 17.06.2010
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.
Re: server have a high ping -
DeathOnaStick - 17.06.2010
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.
Re: server have a high ping -
Headshot1108 - 17.06.2010
off course is on a root.
bandwith: 65 GBit
Re: server have a high ping -
Headshot1108 - 17.06.2010
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 >.<