#How would i do this?

1 messages · Page 1 of 1 (latest)

smoky cargo
#

Yet again im asking this question, but i was told to use a plugin to change the F3X Deps, yet i dont know how to do this. I really want to make a btools logs plugin that makes it so if you unanchor a part / model, it will log it in a logs part named "Btools Logs" that can be shown using :btoolslogs, can someone write a plugin that does this for me or tell me how to do it? Thanks!

bright arch
#

I have made one

smoky cargo
#

Okay, but how would i even make it to log when a player unanchors something, i have tried before multiple times and i never got it to work.

#

Is it even possible?

bright arch
#

Add your custom F3X deps as a child instance of the plugin

#

It has to be named "F3X Deps"

smoky cargo
#

Yes but how would i make it so when a player unanchors something it logs it. I have tried multiple times in the past before even with custom mainmodules, and it never worked.

bright arch
#

r

#

Then just look inside the F3X deps to see what you need to modify, it takes some time to learn but I suggest you do if you are going to be modifying F3X a lot. And be sure to sometimes update your F3X deps to the most recent one

smoky cargo
#

Last thing, how would i make a logs gui with a plugin?

bright arch
#

I'll give you an example logs thing you can modify

#

What is the name of the logs you would like it to be

smoky cargo
#

Btools Logs

bright arch
#

Here is an adonis plugin ```lua
return function(Vargs)
local server, service = Vargs.Server, Vargs.Service

local oldTabToType = server.Logs.TabToType
server.Logs.BtoolsLogs, server.Logs.TabToType, server.Logs.ListUpdaters.BtoolsLogs = {}, function(tab: any, ...: any): string
    if tab == server.Logs.BtoolsLogs then
        return "BtoolsLogs"
    else
        return oldTabToType(tab, ...)
    end
end, function(_)
    return server.Logs.BtoolsLogs
end

server.Commands.BtoolsLogs = {
    Prefix = server.Settings.Prefix;
    Commands = {"btoolslogs", "buildlogs"};
    Args = {"autoupdate? (default: false)"};
    Description = "View the logs of players :btools activity";
    AdminLevel = "Moderators";
    ListUpdater = "BtoolsLogs";
    Function = function(plr: Player, args: {string})
        server.Remote.MakeGui(plr, "List", {
            Title = "Kill Logs";
            Table =  server.Logs.ListUpdaters.BtoolsLogs(plr);
            Update = "BtoolsLogs";
            AutoUpdate = if args[1] and (string.lower(args[1]) == "true" or string.lower(args[1]) == "yes") then 1 else nil;
            Sanitize = true;
        })
    end
}

server.Admin.CacheCommands()

-- // Run this piece of code below when ever you wan't to add something to the logs
server.Logs.AddLog(server.Logs.KillLogs, {
    Text = YOURTITLE,
    Desc = YOURDESCRIPTION,
})

end

smoky cargo
smoky cargo
#

I dont think ill be able to make this btools logs thing, i dont think ill be able to get the sendlog function into the anchor script since its F3X Deps, would i?

#

@bright arch

bright arch
#

Its the server module taht handles stuff

smoky cargo
#

whats the sync module

#

is it part of f3x deps

#

or adonis

smoky cargo
#

i fount the syncmodule

#

i just dont know how ill send it to the log

#

@bright arch

bright arch
#

Fire the bindable event from syncmodule and lisen it on the btools logs plugin

smoky cargo
#

how do i get the function in the f3x logs plugin

#

server.AddLog or whatever the function is

#

in the plugin?

bright arch
#

Like

smoky cargo
#

and also i forgot how to check when a bindable event gets fired and how to make it add log

#

💀

bright arch
#

Make a BindablEvent in your game in like ReplicatedStorage. Then make the SyncModule code :Fire() that BindableEvent and then connect in your plugin to the BindableEvent via THEBINDABLEEVENT.Event:Connect(function()end)

smoky cargo
#

id rather do it with remoteevent im more expirenced with that

bright arch
#

A bindable event is very simular

#

Infact its almost the same

#

Use .Event:Connect()

#

And :Fire()

#

It's that simple

smoky cargo
#

but can i use args with :fire()

smoky cargo
bright arch
smoky cargo
#

i got this error already

bright arch
bright arch