This guide explains how to create custom addon buttons and addon statistics for your Luxu Admin Panel. These features allow you to extend the admin panel with custom functionality specific to your server.
Addon buttons are custom action buttons that appear in the Player Management panel when viewing a player. They allow you to execute custom logic when clicked, with the ability to interact with both client and server-side code.
Where they appear: Addon buttons are displayed in the Player Management panel when a player is selected.
Addon buttons are created in luxu_admin/config/custom_functions/client.lua using the RegisterAddonButton function.
RegisterAddonButton(name, label, icon, color, clientCallback, permission)
name (string): Unique identifier for the button. Must be unique across all addon buttons. This name is used to link the client button with the server callback.label (string): Display text shown on the button (e.g., "Give Money", "Teleport Player").icon (string): Icon identifier. Supports Material Icons ("material-icon-theme:icon-name") and MDI ("mdi:icon-name"). Examples: "mdi:cash-multiple", "mdi:account-group".color (string): Hex color code for the icon (e.g., "#f54266", "#4CAF50").clientCallback (function): Function executed when the button is clicked.permission (string, optional): Permission required to execute the button. If provided, the button will check the player's permission before executing the callback. The player must be on duty and have the specified permission. Examples: "player.kick", "vehicles.spawn", "player.ban".