Thank you so much for all of your wonderful assistance. It worked but I have once concern, the message only stays up for 2 seconds total. The display time is 15, and it waits 15 seconds in between the two messages…
Maybe because your message is short? If message is long then the display time will be long. The “DisplayTime” is just time you need to wait before the next message.
Is there possibly a way to have a command available exclusively for those who own a gamepass?
I think when you set the pluginLevel to 0, it will be visible for everyone. I don’t know if it is possible to make it for those who has the gamepass. This is because when you created a plugin, it will be inserted in the commands list.
Maybe do some things in the plugin like do a return
statement.
#1
Nope, because command only executes if person has the correct admin level or above. You can create a gamepass for admin though so they can execute command and just limit their commands, you need to have access to main module.
#2
You can create your own admin level, but you need to make it correctly and you need to have access to main module, then just set commands that will be visible to the new admin level.
Is there any way to add a variable that would require the user running the command to say the user who the instant PM should be sent to? I tried
remoteEvent:FireAllClients('PM',Player,"info1","info2",true)
adding player but that didn’t work.
.
.
Also, Big thanks to @aIIexyss @lluckvy @OptimisticSide @Quwanterz for everything they have been doing to help!!
Yes, it is possible, you need to use arguments.
Also, you need to add a variable. Are you making a plugin or making a command in a main module?
Plugin.
Any possible way you could provide me with some of the code? I’ll review it and try my best to check out how the variables etc are working.
Not just gonna take it and use it.
BAE has an example-plugin which is already in your game in the plugins folder. Code can be found below:
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 = 'exampleplugin'
local pluginPrefix = Prefix
local pluginLevel = 1
local pluginUsage = "<User(s)>" -- 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]
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,'Notif','Lorem Ipsum','Plugin Example',{'Message','Results',combinedVictims})
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
Is there a way to have the PM send to specific people rather than the whole server? For example:
:sendinfo [player]
Yes, it is. If you want to send an actual PM, then it would be different. I’m assuming you don’t.
You just need to replace “Player” with the player of your choice.
remoteEvent:FireClient(game.Players.lyoorubyjane,"Notif","Hello World","😍",{"Hint","🤩","😳"})
I’m firing a notification to myself in that example, which will display a hint.
Adding on, you can make it show at the bottom of the screen.
Just replace the “true” by “false”.
remoteEvent:FireAllClients('PM',"Oh hey this is the PM title","Oh look heres the body text.", false)
Whatsoever, it will say: “PM from Oh hey this is the PM title”. If you don’t want it to do that, you will need to bring some modifications to the module. I personally just replace with “Server” so it says “PM from Server”.
Ah, how do I know which command does it?
How much plugins can you do, how do you enable more than 2 plugins, and do you know how to make a :h command but it stays?
I checked basic admin’s code, and noticed this:
local waitTime = (#hintBodyText.Text*0.1)+1
This shows that the duration a hint will stay 1 second longer than 1/10 of the amount of characters in the hint messsage.
Alright. Is it in the module? Or in the normal script?
It’s in the client-sided code. You’d want to pass waitTime
as a parameter, and implement a conditional statement in the line where you declare the waitTime
variable.
waitTime = waitTime or (#hintBodyText.Text*0.1)+1
Edit, just replace the line with this:
local waitTime = Data[3] or (#hintBodyText.Text*0.1)+1
It should adapt without the need for any more code. Once you’ve done this, you can simply pass it as a parameter when firing to the client via your plugin.
Is it possible to remove the waitTime
altogether?
What I mean by this is, is it possible to have it removed so the message will stay there (within the plugin script)?
What exactly do you mean? Do you want the message to be present on the player(s) screens until they click it to dismiss it? I don’t see any harm in simply setting the duration to be 60
, meaning it will remain present on the screens for 1 minute.