I am making a military group and I need help creating an imprisonment system using the Adonis admin plugin. I am having difficulty creating the function which allows the command to work.

server = nil -- Mutes warnings about unknown globals
service = nil
return function()
    server.Commands.AdonisExample = {
        Prefix = server.Settings.Prefix, -- Prefix to use for command
        Commands = {"detain", "imprison", "incarcerate"}, -- Commands
        Args = {"player", "number"}, -- Command arguments
        Description = "Imprison a player for the specified time.", -- Command Description
        Hidden = false, -- Is it hidden from the command list?
        Fun = false, -- Is it fun?
        AdminLevel = "Moderator", -- Admin level; If using settings.CustomRanks set this to the custom rank name (eg. "Baristas")
        Function = function(plr, args) -- Function to run for command
        end
    }
end

What I want the command to do:

Put the player into the "incarcerated" team Wait for the specified time Put the player back into their original team after the time has elapsed and reset them so they are no longer in prison

3 comments

0

edit your question and use a coding block and put your code in it

0

Please do not format your question like this again.

0

Firstly, you declare "server" as nil. Secondly, you never actually programmed the Incarcerator function....