Jump to content

[HELP] Problem with a timer


Erlkonig

Recommended Posts

Posted (edited)
    local serverTime = getRealTime()
    local minute = serverTime.minute
    theFirstTimer = setTimer(function()
        justOneFunction()
        eveyHourTimer = setTimer(justOneFunction60*600000)
    end, (60 - minute) * 600001)

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 by Erlkonig
  • Moderators
Posted

Looks good to me, I think the problem is somewhere else.

Is this code-part inside any event/function?

  • Thanks 1
Posted
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 :) 

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...