-
-
Notifications
You must be signed in to change notification settings - Fork 2
Library: Timer
ᴏᴠ ━ ᴀɴɪꜱᴀ edited this page Dec 5, 2024
·
9 revisions
Timers are essential for executing specific handlers at regular intervals. The default MTA timers have limitations, particularly when passing arguments like tables, as they don't pass arguments by reference.
Add the below code globally once in either of the shared .lua
script of the resource you want to use within:
loadstring(exports.assetify_library:import("timer"))()
-
✨ Retrieve's instance's type.
local string: type = self:getType()
-
✨ Creates a new timer.
local timer: cTimer = assetify.timer:create( function: exec, int: interval, int: executions, ~: ...arguments )
-
✨ Destroys an existing timer.
local bool: result = self:destroy()