Exports
toggleUI(state: boolean)
toggleUI(state: boolean)Shows or hides the entire UI.
exports.rs_tasklist:toggleUI(true) -- displays the UI
exports.rs_tasklist:toggleUI(false) -- hides the UItoggleNumberOfTask(state: boolean)
toggleNumberOfTask(state: boolean)Turns task numbering on or off.
exports.rs_tasklist:toggleNumberOfTask(true) -- displays numbers for tasks
exports.rs_tasklist:toggleNumberOfTask(false) -- hides numbers updateTaskAmount(taskAmount: number)
updateTaskAmount(taskAmount: number)Updates the current number of completed tasks (for the progress bar).
luaZkopírovatUpravitexports.rs_tasklist:updateTaskAmount(2) -- e.g. 2 out of 5 doneupdateStageAmount(index: number, currentStage: number)
updateStageAmount(index: number, currentStage: number)Updates the "stage" (phase) of a task. Can be used, for example, for multi-stage tasks.
exports.rs_tasklist:updateStageAmount(1, 2) -- task at index 1 is in phase 2toggleCompleteByIndex(index: number)
toggleCompleteByIndex(index: number)Označí (nebo odznačí) úkol jako splněný.
exports.rs_tasklist:toggleCompleteByIndex(1) -- marks the 1st task as completedsetTaskData(data: table)
setTaskData(data: table)Sets the entire task list — typically at the beginning of an order or mission
title
string
The name of the task list displayed in the UI.
maximumTask
number
Total number of tasks (e.g. number of items).
currentTaskAmount
number
Number of tasks already completed (e.g. 0 at the beginning).
showNumberOfTask
boolean
Show task numbering (true/false).
dynamicBar
boolean
Show progress bar depending on currentTaskAmount.
tasks
table[]
See below for a list of individual tasks.
Sample:
local taskData = {
title = "Delivery",
maximumTask = 3,
currentTaskAmount = 0,
showNumberOfTask = true,
dynamicBar = true,
tasks = {
{
index = 1,
icon = "fa-solid fa-box",
text = "3x Water",
completed = false
},
{
index = 2,
icon = "fa-solid fa-bottle-water",
text = "2x Juice",
completed = false
},
{
index = 3,
icon = "fa-solid fa-truck",
text = "1x Car",
completed = false
}
}
}
exports.rs_tasklist:setTaskData(taskData)resetCompletes()
resetCompletes()Resets all tasks to "incomplete".
exports.rs_tasklist:resetCompletes()Summary of exported features
toggleUI(state)
Turns UI on/off
toggleNumberOfTask(state)
Turns task numbering on/off
updateTaskAmount(n)
Updates the number of completed tasks
updateStageAmount(i, s)
Sets the task stage by index
toggleCompleteByIndex(i)
Marks or unmarks a task as completed.
setTaskData(data)
Sets the entire task list
resetCompletes()
Resets all task completions
Last updated