Lag Problem
#8

Quote:
Originally Posted by jawiie
Посмотреть сообщение
Sorry im mobile now

In PlayerUpdate

Calculating vehicle speed
Checking for teleport/airbr. hack
Calculating Fuel
Checking Weapon Hack
Total km counter etc.

Sometimes we play with 65 players nolag, sometimes we play with 2-5 players laggy
Well, it is advised to use the least number of code in OnPlayerUpdate to avoid any mess and/or lag spikes. Seemingly, you're using y_timers which would be very effective if you add the code that you have on OnPlayerUpdate to an existing timer you have created to a short-time-interval.

It might not be the main source of lag, but it could help to minimize it as possible. Also, are you sure you're not being DDoSed?

Are you using something like:
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
for your loops? Try minimizing your loops as much as you can unless you're confident they don't hurt - try foreach.inc?
Reply


Messages In This Thread
Lag Problem - by jawiie - 14.02.2015, 16:06
Re: Lag Problem - by Nixco - 14.02.2015, 16:20
Re: Lag Problem - by jawiie - 14.02.2015, 17:14
Re: Lag Problem - by LinuxViper - 14.02.2015, 17:36
Re: Lag Problem - by NoSoap - 14.02.2015, 17:54
Re: Lag Problem - by jawiie - 14.02.2015, 18:33
Re: Lag Problem - by CalvinC - 14.02.2015, 19:12
Re: Lag Problem - by Nixco - 14.02.2015, 20:36
Re: Lag Problem - by jawiie - 14.02.2015, 22:14
Re: Lag Problem - by rymax99 - 15.02.2015, 02:22

Forum Jump:


Users browsing this thread: 3 Guest(s)