Timer question
#2

Quote:
Originally Posted by Delux13
Посмотреть сообщение
Because since iv made this the 1 big timer looping threw all players i experienced some lag in my server.
How many players do you have on your server? And are you checking to see if they're in a vehicle / connected aswell?

Quote:
Originally Posted by ******
Посмотреть сообщение
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.
I agree, although i have to say i don't use them. From what i have read about them, they seem to do your job pretty well, along with, well, anything

--
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);
        }
    }
}
Reply


Messages In This Thread
Timer question - by [MWR]Blood - 01.05.2011, 12:00
Re: Timer question - by Ash. - 01.05.2011, 12:25
Re: Timer question - by Miguel - 01.05.2011, 12:56

Forum Jump:


Users browsing this thread: 1 Guest(s)