LuxuAdmin allows you to add custom buttons with any functionality you would like.
Information:
Open LuxuAdmin/custom_functions/client.lua
Create a new entry inside the Custom_buttons
table
Custom_buttons = {
{ name = 'Example Button', event = 'LuxuAdmin:ExampleCustomButton', category = 'players' },
}
Create the NUI event handler with the event we defined above
--- the "targetSvId" is only valid if the button is de
RegisterNUICallback('LuxuAdmin:ExampleCustomButton', function(targetSvId, cb)
-- Check if the admin has permission to use this button
-- Remember luxuadmin.custombutton is just an example ace permission
-- You decide what to name this button's permission
if not CheckPerm('luxuadmin.custombutton') then
cb(false)
return
end
print(string.format('Example function, Target Player Server ID: %s', targetSvId))
cb(true)
end)
Add your own logic to the NUI callback event
LuxuAdmin/custom_functions/server.lua
Finished, now your buttons should show up in the respective menus.