01.05.2011, 12:25
Quote:
Because since iv made this the 1 big timer looping threw all players i experienced some lag in my server.
|
Quote:
I would however recommend using y_timers which is designed to balance the timers used in a mode over time so they don't all trigger at once (as they are often all started at once with the same delays). The next version will also have options for per-player timers too.
|

--
Example timer:
This is the way i do it (well, the reduced version, my version is bigger and logs distance)
pawn Код:
public SpeedTimer()
{
static string[64];
for(new i; i < GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
{
format(string, sizeof(string), "Speed: %i", GetPlayerSpeed(i));
SetSpeedString(i, string);
}
}
}