Local & Global timers
#4

...there exist no local timers...but i think i know what you mean.

Look you can run a timer for every player like:

PHP код:
//Under OnPlayerConnect:
SetTimerEx("PlayerTimer",999,1,"i",playerid); 
This timer would run for every player...

A global timer is sth like this:

PHP код:
//Under OnGameModeInit
SetTimer("ForAll",999,1);
forward ForAll();
public 
ForAll()
{
    for(new 
ii<MAX_PLAYERSi++)
    {
         
//here the code
    
}

So you see..the global timer handels all players in one timer..so you dont need 500 timers..only 1
Reply


Messages In This Thread
Local & Global timers - by xClown - 14.09.2015, 17:47
Re: Local & Global timers - by xClown - 14.09.2015, 23:57
Re: Local & Global timers - by sanamalik400 - 15.09.2015, 00:01
AW: Local & Global timers - by Kaliber - 15.09.2015, 00:47
Re: Local & Global timers - by Scenario - 15.09.2015, 01:22

Forum Jump:


Users browsing this thread: 1 Guest(s)