Export
IP Table Documentation
Overview
This script opens an ip_table with a given set of data, actions, and an event handler for closing.
Table Configuration
Properties:
id: (string) The title identifier for the table.head: (table) The headers of the table columns.list: (table) A list of data entries.onClose: (function) A function that executes when the table is closed.actions: (table) A set of named actions that execute functions when a row is selected.
Example Usage
exports.ip_table:open({
id = "Title",
head = { "Name", "VipLevel" },
list = {
{"RoyleWind","5"},
{"SLNC","2"},
{"XPHANTOP","1"},
},
onClose = function()
print("Closed 🚪")
end,
actions = {
["Print"] = function(index, data)
print("Name: " .. data[1])
end,
["Action 2"] = function(index, data)
print("Name: " .. data[1])
end,
}
})Actions
Print: Prints the
Namefield of the selected row.Action 2: Prints the
Namefield of the selected row (duplicate function for customization).
Closing Behavior
When the table is closed, it prints Closed 🚪 in the console.
Notes
This script is designed for integration within an existing system using
exports.ip_table.Modify the
actionssection to add additional functionalities.
Last updated