System::notify
Sends the user a Windows notification.
Syntax
mp.system.notify({ title, text, attribute, duration, silent });
Parameters
- title String
- text String
- attribute String
- duration Int
- silent Boolean
Examples
A server will notify a player 5 minutes before they're kicked for AFK idle.
mp.events.add('AFK_Reminder', () => {
mp.system.notify({
title: 'AFK Timer',
text: `You have 5 minutes until you're kicked from the server.`,
attribute: 'Test Roleplay',
duration: 5,
silent: true
});
});