Adonis Admin Setup Guide for Developers

If you don’t require arguments for a command, just leave the Args table empty? There isn’t much to say about this really, and the info needed to work with custom Adonis commands is provided in API docs assuming prior scripting knowledge. But I do agree that more about that can be covered here to give developers a useful start and clarify how things work. Will begin writing right away edit: I’ve just expanded the section about the command table structure, thanks!

3 Likes

Adonis 2.0? Cringe.
Aside from that, _G documentation please???

1 Like

Hello noob kind sir,
What does the “MIT” License mean?

Hi I am trying to make a new command. How would I go about making a GUI For this?

xp = {
		Prefix = Settings.PlayerPrefix;
		Commands = {"xp"};
		Args = {};
		Hidden = false;
		Description = "Shows your current XP in NHC concepts.";
		Fun = false;
		AdminLevel = "Players";
		Function = function(plr, args, data)
			
			Remote.MakeGui(plr, "Notification", {
				Title = "Hello, "..plr.DisplayName;
				Message = "XP varible will be here";
				Time = 10;
			})


		end
		};

I have no idea how to access the remote variable or the server variable to make the adonis GUI

1 Like

Turns out I have found a solution.

Remote.MakeGui(plr, "Notification", {
				Title = "Hello, "..plr.DisplayName;
				Message = "XP varible will be here";
				Time = 10;
			})

I just did

server.Remote.MakeGui(plr, "Notification", {
				Title = "Hello, "..plr.DisplayName;
				Message = "XP varible will be here";
				Time = 10;
			})

I should probably do a lot more digging before I post. But here is the solution if anyone is still figuring it out

1 Like

In an Adonis script environment, the server global variable is a large table containing server resources and core modules such as Remote (for handling of server-client communications), Commands (table containing Adonis commands), Admin (for handling permissions and ranks-related stuff) and several others.

Read more into depth here:

If you wanted to overide some of the commands could you just do it in the settings module or do you have to fork the main module?

You can do it from a server plugin module in the loader. For example:

--// ModuleScript named "Server-SomeRandomPlugin" placed under Adonis_Loader > Config > Plugins

server, service = nil, nil
return function()

    --// override the behavior of :kill
    server.Commands.Kill.Function = function(plr: Player, args: {string})
        print(plr.DisplayName, "tried to kill:", args[1])
    end

    --// another way to disable :kill
    server.Commands.Kill.Disabled = true

    --// override the description of :kill
    server.Commands.Kill.Description = "OOFs the target player(s)"

    --// Refer to the Structure of an Adonis Command section in my guide for more relevant info.

    --// You may have to check the MainModule to get a command's index (unique identifier) in server.Commands
    --// ex: server.Commands.Resize for the ":size" cmd where "Resize" is the index

end

Remember, you never have to fork the MainModule.

Wow, really nice in-depth tutorial. I’ve been using Adonis Admin for at least 2 years but this helped with stuff like Trello to understand it more.

quick question. what’s this?

Basically a website (adonis.dev) that lets you control your game and configure Adonis from it. Unfortunately its backend is closed-source and worked on by a solo developer so it rarely gets updated these days, leading to some aspects of the webpanel becoming fairly outdated and incomplete overall. Which is why I didn’t go into detail in my article about the webpanel feature.

If you do want to try it out, however, you can get information on how to set it up by visiting the Adonis/Epix Incorporated discord server.

Screenshots:

A revamped version is coming sometime but we don’t know when.

How do I join the discord? The link is expired.

Oops, we had to change the invite link due to a recent issue.

Just updated it with the new one that should work, try again.

2 Likes

Edit: [Solved]

How do I get rid of the randomized names for the GUIs that are added into the PlayersGui? It is conflicting with my Anti-Exploit system that checks for Guis and I can’t Whitelist the Adonis Guis because the names are randomized.

Is it possible to give private server owners admin permissions to kick and ban people in their own server. But only in their server not the whole game.

If not can this feature be added, thanks.

how do you do it?
im also trying to do an Anti-Exploit system that checks for Guis

Hiya supreme, you can edit permissions for each command or make custom ranks with only certain permissions, you have 2 options, remove the ability for every rank besides the private server admin or turn off saving data.

You want to only give private server admin the ability to serverban and kick, a server ban only applies to the server they are in.

Hi, i need a help with setup where moderators can use commands ONLY to theirself.

Hye

Just go into the code or their module and edit it, then just store it in your game and require it from your edited version.

i am using the loader. Can you show me how to do that?

hey @Expertcoderz im here with a suggestion
could you guys make it possible to pass additional arguments to :script? it would be really useful for making aliases so you can make universal ones! thanks