If this can be a reason for server slowdown - lagg ?
#3

Quote:
Originally Posted by ikey07
Посмотреть сообщение
If this can be a reason for server slowdown - lagg ?

pawn Код:
OnPlayerUpdate(playerid)
{
    for(new veh = 0; veh < MAX_VEHICLES; veh++)
    {
        if (CarLocked[veh] == 1) { SetVehicleParamsForPlayer(veh,playerid,0,1); }
        else { SetVehicleParamsForPlayer(veh,playerid,0,0); }
    }
}
??
100 % sure, it looks like you want the server to crash!?

MAX_VEHICLES = 2000
OnPlayerUpdate gets called every... like 0.05 seconds.
That means that script part is called about 40.000 times every 1 second for 1 player.
That means if you have 200 players in your server, times 40.000 = 8.000.000 times a second.

So if you have 200 players, that script part will be executed 8 million times per second.
Reply


Messages In This Thread
If this can be a reason for server slowdown - lagg ? - by ikey07 - 03.08.2010, 16:56
Re: If this can be a reason for server slowdown - lagg ? - by Jefff - 03.08.2010, 17:05
Re: If this can be a reason for server slowdown - lagg ? - by WackoX - 03.08.2010, 17:11
Re: If this can be a reason for server slowdown - lagg ? - by ikey07 - 03.08.2010, 17:14

Forum Jump:


Users browsing this thread: 1 Guest(s)