[QUESTION] SetTimer

Is it possible to use something like this in FiveM?

Example #1

function a()
      print("This is a timer")
end
setTimer(a, 3000, 0)

OR

Example #2

setTimer(function()
    print("This is a timer")
end, 3000, 0)

There’s a setTimeout function which will call the callback after amount of time.

https://docs.fivem.net/docs/scripting-reference/runtimes/lua/functions/Citizen.SetTimeout

There is no setInterval so you will have to implement that yourself.

Oh, I understand