One timer or loop?
#3

Quote:
Originally Posted by Mencent
Посмотреть сообщение
Hello!

Use the SetTimer with a loop it is better because if you use SetTimerEx you can have (the maximum!) 500 timers at the same moment, and this is too much. Well, use SetTimer with a loop and do it like this:
That's the best way for a good performance:
PHP код:
public Timer()
{
    for(new 
i,j=GetPlayerPoolSize();i<=j;i++)
    {
        if(!
IsPlayerConnected(i) || IsPlayerNPC(i))continue;
    }
    return 
1;

Sorry, but no.

OT: This has been discussed already.
https://sampforum.blast.hk/showthread.php?tid=575349
Reply


Messages In This Thread
One timer or loop? - by TwinkiDaBoss - 30.07.2015, 02:05
Re: One timer or loop? - by Mencent - 30.07.2015, 07:05
Re: One timer or loop? - by dominik523 - 30.07.2015, 07:52

Forum Jump:


Users browsing this thread: 1 Guest(s)