Need Support With A BAE Command!

Greetings! I’m trying to make a Basic Admin plugin. I’ve made these before, however, I want to make it so if they say “!updatelog” they see the update log. I only know how to make one like “!updatelog (USER)”. Please help! :slight_smile:

Code:

local function pluginFunction(Args) -- keep the name of the function as "pluginFunction"
	local Player = Args[1]
	if Args[3] then
		local Victims = returnPlayers(Player, Args[3]) if not Victims then return end
		local combinedVictims = ''
		for a,b in pairs(Victims) do
			if combinedVictims == '' then
				combinedVictims = b.Name
			else
				combinedVictims = combinedVictims..', '..b.Name
			end
		end
		for a,b in next,Victims do
			remoteEvent:FireClient(b,'PM',"Rules",sysTable.Rules,true)
		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}
1 Like

Just use the first index of the args table, which is the speaker of the command.

local function pluginFunction(args)
    local speaker = args[1]
    remoteEvent:FireClient(speaker, 'PM', "Rules", sysTable.Rules,true)
end
2 Likes

It worked, thank you so much!!! I’ve been trying for ages.