Right, so my brain has gone blank and I am having difficulties getting a custom PM to open when you click on a BAE Notif.
So, I can see in the MainModule and Essentials Code, it has this code to open something through a click:
pendNotif(adminTitle,'Click for Commands',{'Cmds'})
But, when I take this and adapt it in a plugin, it doesn’t open anything. I have tried to reference the PM, but that failed to work as well. Here is my code as of now:
-- 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(Player,'Notif', 'New PM', 'Click to open.',{'PM', 'Title', 'Content',true})
end
end
end
Honestly, I don’t know where my knowledge of Notif’s have gone so if you can, please help
This is how you would typically call the Notification function.
In your request, we can see your request is malformed. You should change your code to be a little like this:
remoteEvent:FireClient(Player,'Notif', 'New PM', 'Click to open.',{'Message', 'Title', 'Content',true})
I haven’t used the main module as part of this response (I just had a look at the example plugin) so I don’t know if you can pass that trueparameter at the end but if you can please let me know later in this thread what it’s for and if you need it.