Basic Admin Essentials Commands

I’m trying to get this script so when you specify the second args as Officers, then you will be teamed Officers. However my script doesn’t work and I’d really appreciate the help.

And if you know where I can find the base functions for this, then I’d appreciate it if you could share it with me.


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 = 'setteam'
	local pluginPrefix = Prefix
	local pluginLevel = 0
	local pluginUsage = "officer" -- leave blank if the command has no arguments
	local pluginDescription = "Selects Team"

	-- Example Plugin Function --
	local function pluginFunction(Args) -- keep the name of the function as "pluginFunction"
		local Player = Args[1]
		if Args[2] == 'Officers' then
			Player.Team = game.Teams.Officers
			Player:LoadCharacter()
			remoteEvent:FireClient(Player,"Notif",'Anti Abuse 🛡️',"Make sure you're not abusing this system!")
		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
1 Like

Hey, using the notif system in basic admin may be complicated to do. However I do notice you are missing something in that line, try changing it to remoteEvent:FireClient(Player,"Notif",'Anti Abuse 🛡️',"Make sure you're not abusing this system!", {'clear'})

I had figured it out long before anyone every gave me a solution as you can see it’s been a while lol. Thank you for trying though. Much appreciated man.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.