Erlkonig Posted April 13, 2021 Share Posted April 13, 2021 (edited) local serverTime = getRealTime() local minute = serverTime.minute theFirstTimer = setTimer(function() justOneFunction() eveyHourTimer = setTimer(justOneFunction, 60*60000, 0) end, (60 - minute) * 60000, 1) My problem in that fact the timer function was called a lot of time insted of one. I still can not resolve this problem. Have someone an idea? I tried to find more information about timers in MTA SA but still can not resolve that. Edited April 13, 2021 by Erlkonig Link to comment
Moderators Patrick Posted April 13, 2021 Moderators Share Posted April 13, 2021 Looks good to me, I think the problem is somewhere else. Is this code-part inside any event/function? 1 Link to comment
Erlkonig Posted April 13, 2021 Author Share Posted April 13, 2021 36 minutes ago, Patrick said: Looks good to me, I think the problem is somewhere else. Is this code-part inside any event/function? Thanks! I am idiot Link to comment
Erlkonig Posted April 14, 2021 Author Share Posted April 14, 2021 The problem was resolved. Timer was inside the eventHandler The topic can be closed. Link to comment
Recommended Posts