Scheduler System
scheduler:setTick
---@alias SetTickCookie fun()local stopTick = scheduler:setTick(function()
-- This runs every frame
local playerPos = GetEntityCoords(PlayerPedId())
DrawMarker(1, playerPos.x, playerPos.y, playerPos.z - 1.0, 0, 0, 0, 0, 0, 0, 2.0, 2.0, 1.0, 255, 0, 0, 100, false, true, 2, false, nil, nil, false)
end)
-- Stop the tick when no longer needed
stopTick()scheduler:clearTick
Complete Scheduler Example
Best Practices
Scheduler Management
Last updated