Перейти к содержанию

System::notify

Материал из RAGE MP Wiki Archive
Версия от 05:08, 22 апреля 2020; imported>MrPancakers2
(разн.) ← Предыдущая версия | Текущая версия (разн.) | Следующая версия → (разн.)

Client-Side
Function

 JavaScript



Sends the user a Windows notification.

JavaScript Syntax

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
    });
});


See also