03.10.2017, 12:52
What's the best option to make timers from these two options.
Multiple Timers
A
Or
B
What's best? A or B
Multiple Timers
A
PHP Code:
new stime;
forward Time();
public OnGameModeInit()
{
SetTimer("Time",1000,true);
return 1;
}
public Time()
{
// some code
if(stime%120==0) // Do some code each 2 minutes
{
}
if(stime%1800 == 0) // Do some code each 1800 seconds
{
}
stime++;
return 1;
}
B
PHP Code:
public OnGameModeInit()
{
SetTimer("Time",1000,true);
SetTimer("Time1",120000,true);
SetTimer("Time2", 1800000, true);
return 1;
}
forward Time();
forward Time1();
forward Time2();
public Time()
{
}
public Time1()
{
}
public Time2()
{
}