SetTimer or SetTimerEx ??
#1

What is better to use?

This?
Код:
SetTimerEx("Timer", 1000, true, "i", playerid);
public Timer(playerid)
{
    //code
    return 1;
}
Or This ?
Код:
SetTimer("Timer", 1000, true);
public Timer()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        // code
    }
    return 1;
}
Reply
#2

I really don't know, to be honest. I think the first one would be the better option as it allows for more sync. Do timer stuff for a player, sync a bit, do timer stuff for another player, sync a bit, ... As opposed to: do timer stuff for everyone, sync everything.
Reply
#3

Its always better to have 1 timer as loop can be executed faster then many timers, also timers is not accurate it can be 1010 or 990 milliseconds afaik, so for each player each thing will happen in different time.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)