SA-MP Forums Archive
Does OnPlayerUpdate lag? - 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)
+--- Thread: Does OnPlayerUpdate lag? (/showthread.php?tid=400411)



Does OnPlayerUpdate lag? - CONTROLA - 18.12.2012

pawn Код:
public OnPlayerUpdate(playerid)
{
  new keys, updown, leftright;
  GetPlayerKeys (playerid, keys, updown, leftright);
  if((updown != 128 && updown != 0 && updown != -128) || (leftright != 128 && leftright != 0 && leftright != -128))
  {
      UsingJoypad[playerid] = 1;
  }
}
Will this code lag my server?


Re: Does OnPlayerUpdate lag? - Dan. - 18.12.2012

Well when a players FPS is 100, no need to check if a player is using joypad 100 times in a sec, or is there?


Re: Does OnPlayerUpdate lag? - [ABK]Antonio - 18.12.2012

Quote:
Originally Posted by Dan.
Посмотреть сообщение
Well when a players FPS is 100, no need to check if a player is using joypad 100 times in a sec, or is there?
It doesn't check 100 times even with 100 fps