How to disable command part for all, to prevent abuse

Hello.

Can somebody help me, I using in my experience Adonis admin commands, I want to disable all for players that have gamepass access.
I mean this part of command, for example:
;command all

Is there is any plugin for Adonis?

1 Like

You can most likely just edit the adonis script itself, it’s a lot to go through but if you find where the commands are handled at, you can go about not letting commands run through when “all” is included in the message

2 Likes

Ok, i found plugin:

--!nolint UnknownGlobal
--[[
	SERVER PLUGINS' NAMES MUST START WITH "Server:" OR "Server-"
	CLIENT PLUGINS' NAMES MUST START WITH "Client:" OR "Client-"

	Plugins have full access to the server/client tables and most variables.

	You can use the MakePluginEvent to use the script instead of setting up an event.
	PlayerChatted will get chats from the custom chat and nil players.
	PlayerJoined will fire after the player finishes initial loading
	CharacterAdded will also fire after the player is loaded, it does not use the CharacterAdded event.

	service.Events.PlayerChatted(function(plr, msg)
		print(msg..' from '..plr.Name..' Example Plugin')
	end)

	service.Events.PlayerJoined(function(p)
		print(p.Name..' Joined! Example Plugin')
	end)

	service.Events.CharacterAdded(function(p)
		server.RunCommand('name',plr.Name,'BobTest Example Plugin')
	end)

--]]

return function()
	--// Change the kick command to do nothing:
	server.Commands.Kick.Function = function(plr, args)
		if args[1] == "all" then
			plr:Kick("Abusing the kick command.")
		end
	end
	server.Commands.Ban.Function = function(plr, args)
		if args[1] == "all" then
			plr:Kick("Abusing the ban command.")
		end
		
	end
	server.Commands.Unban.Function = function(plr, args)
		if args[1] == "all" then
			plr:Kick("Abusing the unban command.")
		end
	end
	server.Commands.Permban.Function = function(plr, args)
		if args[1] == "all" then
			plr:Kick("Abusing the perm ban command.")
		end
	end
	server.Commands.Brazil.Function = function(plr, args)
		if args[1] == "all" then
			plr:Kick("Abusing the brazil command.")
		end

	end
	server.Commands.Explode.Function = function(plr, args)
		if args[1] == "all" then
			plr:Kick("Abusing the explode command.")
		end

	end
	server.Commands.Kick.Function = function(plr, args)
		if args[1] == "others" then
			plr:Kick("Abusing the kick command.")
		end
	end
	server.Commands.Ban.Function = function(plr, args)
		if args[1] == "others" then
			plr:Kick("Abusing the ban command.")
		end

	end
	server.Commands.Unban.Function = function(plr, args)
		if args[1] == "others" then
			plr:Kick("Abusing the unban command.")
		end
	end
	server.Commands.Permban.Function = function(plr, args)
		if args[1] == "others" then
			plr:Kick("Abusing the perm ban command.")
		end
	end
	server.Commands.Brazil.Function = function(plr, args)
		if args[1] == "others" then
			plr:Kick("Abusing the brazil command.")
		end
	end
	server.Commands.Explode.Function = function(plr, args)
		if args[1] == "others" then
			plr:Kick("Abusing the explode command.")
		end

	end
end

Result:
https://www.youtube.com/watch?v=jyi9k1adIDM