How do I make different admin groups for Cmdr?

I want to make certain commands only work for admins but let moderators use all the other commands.
Is that possible with Cmdr? How would I do that?

2 Likes

I’m not sure about Cmdr, but I’m pretty sure this is possible with Adonis admin.

It is, but I wanted to try something more simplfiied for commands.

have you found a great explanation yet? i’m also looking for a way to have admin, owner and testers different cmds.

i know that its possible, but i don’t know how to do it.

Pretty sure Cmdr is the admin system with the somewhat complex setup if I am not wrong. Could you possibly provide a picture of where everything is located?

Edit: What you can do is replace your script that handles execution with this:

local GROUP_ID = 000
local GROUP_RANK = 255

return function (registry)
	registry:RegisterHook("BeforeRun", function(context)
		if context.Group == "DefaultAdmin" and context.Executor.UserId ~= game.CreatorId then
			return "You don't have permission to run this command"
		end
		if context.Group == "DefaultAdmin" and not (context.Executor:GetRankInGroup(GROUP_ID) == GROUP_RANK) then
			return "You don't have permission to run this command"
		end
		registry:RegisterHook("AfterRun", function(context)
			print(context.Response)
			return "Command has been run."
		end)
	end)
end