08.07.2015, 14:43
No, both SetTimerEx AND SetTimerEx can be used for repeating and non-repeating timers.
They will be repeating if you set the 3rd parameter to true.
And that's not how you use KillTimer. SetTimer and SetTimerEx return timer IDs, which are neede in KillTimer. For example:
They will be repeating if you set the 3rd parameter to true.
pawn Код:
SetTimer("AFunction", 1000, true); // a repeating timer
SetTimer("AFunction", 1000, false); // a non repeating timer
SetTimerEx("AFunction", 1000, true, "i", 5); // a repeating timer
SetTimerEx("AFunction", 1000, false, "i", 5); // a non repeating timer
And that's not how you use KillTimer. SetTimer and SetTimerEx return timer IDs, which are neede in KillTimer. For example:
pawn Код:
new timerid = SetTimer("AFunction", 1000, true);
KillTimer(timerid);