Basic Admin Essentials Plugin help

Yes, I’m back again looking for more BAE help.

So, I have two things I’m still trying to figure out.

1.
How can I create a command that shows a list of words. What I mean is, when you say :admins for instance, it shows a list of admins in the server. How can I create a similar custom command that shows words of my choice?
I’m trying to do this so it shows a list of places a moderator can teleport to in the map.

2.
I’m also trying to create a command that allows me to teleport to specific places within the map. Like :location City or :location Forest for example. How can I have multiple options in the script that a player can choose from by saying :location ? It’s basically the teleport command but with the CFrames of parts as options and not players.

If this made absolutely zero sense, I am so sorry, but basically I’m struggling to figure this out.

Thanks
MitchDev47

3 Likes

Something like this?

--[[
	
	 ____                                   
	/\  _`\                    __           
	\ \ \L\ \     __      ____/\_\    ___   
	 \ \  _ <'  /'__`\   /',__\/\ \  /'___\ 
	  \ \ \L\ \/\ \L\.\_/\__, `\ \ \/\ \__/ 
	   \ \____/\ \__/.\_\/\____/\ \_\ \____\
	    \/___/  \/__/\/_/\/___/  \/_/\/____/
	                                        
	            
	Admin Essentials v2
	Plugin Documentation
	*coming soon^tm
	
	If you have any questions regarding Plugins, contact TheFurryFish.
	
--]]

local Plugin = function(...)
	local Data = {...}
	
	-- Included Functions and Info --
	local remoteEvent = Data[1][1]
	local remoteFunction = Data[1][2]
	local returnPermissions = Data[1][3]
	local Commands = Data[1][4]
	local Prefix = Data[1][5]
	local actionPrefix = Data[1][6]
	local returnPlayers = Data[1][7]
	local cleanData = Data[1][8] -- cleanData(Sender,Receiver,Data)
	-- Practical example, for a gui specifically for a player, from another player
	-- cleanData(Sender,Receiver,"hi") -- You need receiver because it's being sent to everyone
	-- Or for a broadcast (something everyone sees, from one person, to nobody specific)
	-- cleanData(Sender,nil,"hi") -- Receiver is nil because it is a broadcast
	
	-- Plugin Configuration --
	local pluginName = 'Forest'
	local pluginPrefix = Prefix -- say :Location Forest and it teleports you to the part in the forest.
	local pluginLevel = 0
	local pluginUsage = "" -- leave blank if the command has no arguments
	local pluginDescription = "Assign a staff as overseer."
	
	-- Example Plugin Function --
	local function pluginFunction(Args) -- keep the name of the function as "pluginFunction"
		local Player = Args[1]
		local part = workspace.tp
		Player.Character.HumanoidRootPart.CFrame = CFrame.new(part.Position)
		
		end
	
	-- Return Everything to the MainModule --
	local descToReturn
	if pluginUsage ~= "" then
		descToReturn = pluginPrefix..pluginName..' '..pluginUsage..'\n'..pluginDescription
	else
		descToReturn = pluginPrefix..pluginName..'\n'..pluginDescription
	end
	
	return pluginName,pluginFunction,pluginLevel,pluginPrefix,{pluginName,pluginUsage,pluginDescription}
end

return Plugin

3 Likes

That is it minus ONE thing!
Is it possible to edit the script so there are multiple teleport options? Like I could do

:location Forest
:location Town
:location Beach

Is it possible to have those locations in the same plugin so I don’t have to have a separate command for each spot???

2 Likes

I think I has to be seperated by each specific thing.

2 Likes

Are you certain there is no way to add multiple arguments for the location in this script? If the :tp and :bring commands can show a list of players that you can use in the command, could you do the same in this code?

I know that this is possible; I’ve seen it done before, I just don’t know how to do it myself.

I really appreciate your help though, you’ve gotten me closer to the answer than ANYONE else has so I really appreciate it.

2 Likes

So what are you trying to do here are you trying to make a thing like if you say :location then it will show up a ui of where you can teleport? Can you please show me an example of what you are trying to make?

2 Likes

Exactly.

Here is an example of what I mean. This was recorded in the game SCP: Roleplay.

1 Like

Ill see if I can replicate that

2 Likes

Thank you so much for your help, I really appreciate it!

2 Likes

From what I can tell so far. You would need to create a whole new table of commands in the main module and make another custom commands function and copy the same text for the cmds function. I havent been able to implement it yet though

2 Likes

Alright, I will work on a test version to see if I can get it to work.

It’s your choice, absolutely, but I would thoroughly appreciate it if you can lend any further assistance with this.

Thank you so much for your help.

2 Likes

No problem. Wish I could’ve helped more! If it doesn’t seem to be using your main module go to the basic admin configuration script and change what the loader id is equal to as script.MainModule, - don’t forget the comma. And make sure to put mainmodule inside the config script.

2 Likes

Guess what? I figured most of it out!

1 Like
	
	 ____                                   
	/\  _`\                    __           
	\ \ \L\ \     __      ____/\_\    ___   
	 \ \  _ <'  /'__`\   /',__\/\ \  /'___\ 
	  \ \ \L\ \/\ \L\.\_/\__, `\ \ \/\ \__/ 
	   \ \____/\ \__/.\_\/\____/\ \_\ \____\
	    \/___/  \/__/\/_/\/___/  \/_/\/____/
	                                        
	            
	Adminfile:///C:/Users/celpp/Downloads/jvronn_Training_System.rbxm Essentials v2
	Plugin Documentation
	*coming soon^tm
	
	If you have any questions regarding Plugins, contact TheFurryFish.
	
--]]

local Plugin = function(...)
	local Data = {...}
	
	-- Included Functions and Info --
	local remoteEvent = Data[1][1]
	local remoteFunction = Data[1][2]
	local returnPermissions = Data[1][3]
	local Commands = Data[1][4]
	local Prefix = Data[1][5]
	local actionPrefix = Data[1][6]
	local returnPlayers = Data[1][7]
	local cleanData = Data[1][8] -- cleanData(Sender,Receiver,Data)
	-- Practical example, for a gui specifically for a player, from another player
	-- cleanData(Sender,Receiver,"hi") -- You need receiver because it's being sent to everyone
	-- Or for a broadcast (something everyone sees, from one person, to nobody specific)
	-- cleanData(Sender,nil,"hi") -- Receiver is nil because it is a broadcast
	
	-- Plugin Configuration --
	local pluginName = 'locations'
	local pluginPrefix = Prefix
	local pluginLevel = 1
	local pluginUsage = "" -- leave blank if the command has no arguments
	local pluginDescription = "Hey, this is a plugin example.\nIt's also multi-line!"
	
	-- Example Plugin Function --
	local function pluginFunction(Args) -- keep the name of the function as "pluginFunction"
		local Player = Args[1]
		local table = {":location Forest",":location Beach"}
				remoteEvent:FireClient(Player,'List','Teleport Locations',true,true,table)
			end
	
	-- Return Everything to the MainModule --
	local descToReturn
	if pluginUsage ~= "" then
		descToReturn = pluginPrefix..pluginName..' '..pluginUsage..'\n'..pluginDescription
	else
		descToReturn = pluginPrefix..pluginName..'\n'..pluginDescription
	end
	
	return pluginName,pluginFunction,pluginLevel,pluginPrefix,{pluginName,pluginUsage,pluginDescription}
end

return Plugin

I just dont know how to put the teleport part in but I do know how to make a list.

1 Like

This is amazing. I didn’t expect to hear from you about this again if I’m honest, but this is fantastic.

If I create a table with each of the teleport parts, could I not locate the CFrames from them that way?

1 Like

possibly? i dont really know. It could probaby work

Thanks! I am just needed this command!

1 Like

Let me know if you have done it. It needs to be like:

Forest = cframe.