Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Having difficulty with create a command-execution function through Adonis Admin plugin?

Asked by 3 years ago
Edited by Ziffixture 3 years ago

Please encode Lua code in the Lua block code tag (look for the Lua icon in the editor).

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

0
edit your question and use a coding block and put your code in it Rayguyban2 89 — 3y
0
Please do not format your question like this again. Ziffixture 6913 — 3y
0
Firstly, you declare "server" as nil. Secondly, you never actually programmed the Incarcerator function.... Ziffixture 6913 — 3y

Answer this question