Help With Utility Logs Command

Hey community, I’m trying to create some basic admin essential commands. I’ve gotten some issues along the way. If anyone is open to assist me, that would be great.

COMMAND:

UtilityLogs

CODE:

-- Plugin Configuration --
local pluginName = 'utilitylogs'
local pluginPrefix = ""
local pluginLevel = 1
local pluginUsage = "<User(s)>" -- leave blank if the command has no arguments
local pluginDescription = "Sees logs."

-- Example Plugin Function --
local function pluginFunction(Args) -- keep the name of the function as "pluginFunction"
	local Player = Args[1]
	for i,v in pairs(game.Players:GetChildren()) do
		if returnPermissions(v) >= 1 then
			remoteEvent:FireClient(v,"List","Utility Logs")
		end	
	end
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

Trying to connect it to TheFurryFish’s Hand-To module.

1 Like

If anyone is able to help, that would be helpful!

What’s the issue exactly? You never described the problem.

My issue is I don’t know how to connect it to the Hand-To system on the Main Module. Nor on the plugin.

EXAMPLE WHAT IT WILL SAY IN LOGS:

User has given user item

This is still open, if anyone is able to help that'll be fantastic!

TheFurryFish made the main module to the Hand-To system open source so you could modify that to insert a table to the server each time someone gives an item with table.insert(). And for the plugin, it would retreive the data from the server table. It seems like a big project to me so some expertise would be required.

(Edit) To connect the module to the actual system, in the actual system it’ll say on line 22, all the way towards the right, require(276055841). Replace the numbers with the location of the module. Like require(game.ServerScriptService:WaitForChild("HandToModule") or whatever it’s called.

Links:
Hand-To Module
https://www.roblox.com/library/276055841/HandToModule

Tables

I’m new to scripting, however is it possible to give me something what the code would be like.

Skip down if you don’t care about how I half-figured it out. I’m probably too talkative but ahhh.

(ALSO IF I SOUND CONFUSING, JUST TELL ME AND ILL TRY AND EXPLAIN THE PART BETTER)

Someone else probably has a better way of doing this but if it was me, I’d make a RemoteEvent in ReplicatedStorage. Name it “ToolSignal” (Remote Functions and Events)

Alongside in the HandTo System, just make sure locations are correct and you have this line now.

Now that you can actually edit in the MainModule, go to MainModuleItemsMain_Script.

You can skip this part but if you just wanna know what I did, feel free to read it.
image
v.Name is referring to the actual tool that was processed and given name. It won’t process if it was unsucessful or not valid. So therefore, we got the tool name sorted out. Next we need Player Giving and Player Receiving Names.

In that function, you can find where before v.Name, FullName(Box.Text). Figured out what FullName was a function, if you scroll up a bit in that same script so that is who we are giving the tool too and there complete name. Box.Text is what was inserted from the client to the box when they pressed > Enter. So like, FullName is taking whatever was inserted to Box.Text and correctly it to become the entire and full PlayerName.
image

Lastly, for the player that was giving the item, it’s a client script so we can just use game.Players.LocalPlayer to figure out who is giving the item.

image
Summing that up, in the same script, insert:

local ReplicatedStorage = game:GetService(“ReplicatedStorage”)
ReplicatedStorage:WaitForChild(“ToolSignal”):FireServer(game.Players.LocalPlayer, FullName(Box.Text), v.Name)

1/3 done.
Create a Script (not Local or Module) inside ServerScriptService, doesn’t matter what you call it but call it something like ToolHandler and in the following:

--Definitions--
local ReplicatedStorage = game:GetService("ReplicatedStorage")

--Functions--
ReplicatedStorage:WaitForChild("ToolSignal").OnServerEvent:Connect(function(playerWhoFired, playerWhoReceived, toolReceived)
	print(playerWhoFired.Name .. " gave " .. playerWhoReceived .. " a " .. toolReceived .. ".")
end)

image
image

Hopefully someone will be generous enough to help both of us out on how to incorporate a table and plugin feature, I’m not that experience in it but I know what they are. It should give you a solid headstart or maybe you can hire someone for that part.

thefurryfishtesting.rbxl (288.8 KB)

For the actual plugin, I never really got to work or find someone that had experience in Basic Admin Essentials area so someone else would have to help with that part or DM TheFurryFish on Twitter.

2 Likes

The basic admin essentials code is a mess and there is 0 documentation for how to create custom commands. Just because most cafe genre games use it doesn’t mean there aren’t better alternatives that will make the professional custom commands you’re looking for a lot easier to make. SimpleAdmin is one of the best admin systems that slows for easily made custom commands (or “plugins”).

1 Like

That was very nice of you to help me, however I need it to log inside of the command itself let me try something.

Any updates? Just wondering, I still need help.

I could help you as I create custom commands and modify the main module, add me on discord BodieBlox#6656