#is there a way to make custom logs?
1 messages · Page 1 of 1 (latest)
YEs
Look at this kill logs command for inspiration https://github.com/Epix-Incorporated/Adonis-Plugins/blob/d01c86e4e28fdcaf7f095f5fd500bd77bf83988d/Server/Server-KillLogs.lua
how can i actually make my own logger though as ive read this and it just confuses me and doesnt help to much exept with knowing how to make the gui.
did u ever figure this out?
still on my to do list lmao
Eeeek
return function(Vargs)
local server, service = Vargs.Server, Vargs.Service
local oldTabToType = server.Logs.TabToType
server.Logs.CustomLogs, server.Logs.TabToType, server.Logs.ListUpdaters.CustomLogs = {}, function(tab: any, ...: any): string
if tab == server.Logs.CustomLogs then
return "CustomLogs"
else
return oldTabToType(tab, ...)
end
end, function(_)
return server.Logs.CustomLogs
end
server.Commands.CustomLogs = {
Prefix = server.Settings.Prefix;
Commands = {"customlogs"};
Args = {"autoupdate? (default: false)"};
Description = "View the logs";
AdminLevel = "Moderators";
ListUpdater = "CustomLogs";
Function = function(plr: Player, args: {string})
server.Remote.MakeGui(plr, "List", {
Title = "Custom Logs";
Table = server.Logs.ListUpdaters.CustomLogs(plr);
Update = "CustomLogs";
AutoUpdate = if args[1] and (string.lower(args[1]) == "true" or string.lower(args[1]) == "yes") then 1 else nil;
Sanitize = true;
})
end
}
server.Admin.CacheCommands()
--// Code goes here
end
heres a template
also things you need to change is any instance of "CustomLogs" to whatever you want