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.
--[[
____
/\ _`\ __
\ \ \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
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.
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?
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
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.
____
/\ _`\ __
\ \ \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.