System::notify: Difference between revisions
MrPancakers2 (talk | contribs) (Created page with "{{ClientsideJsFunction}} Sends the user a Windows notification. {{JSContainer| == Syntax == <pre> mp.system.notify({ title, text, attribute, duration, silent }); </pre> ===...") |
MrPancakers2 (talk | contribs) mNo edit summary |
||
| Line 17: | Line 17: | ||
== Examples == | == Examples == | ||
A server will notify a player 5 minutes before they're kicked for AFK idle. | |||
<pre> | <pre> | ||
Latest revision as of 05:08, 22 April 2020
Client-Side Function
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
- mp.game.system.ceil
- mp.game.system.cos
- mp.game.system.floor
- mp.game.system.pow
- mp.game.system.round
- mp.game.system.settimera
- mp.game.system.settimerb
- mp.game.system.shiftLeft
- mp.game.system.shiftRight
- mp.game.system.sin
- mp.game.system.sqrt
- mp.game.system.startNewScriptWithArgs
- mp.game.system.startNewScript
- mp.game.system.startNewStreamedScriptWithArgs
- mp.game.system.startNewStreamedScript
- mp.game.system.toFloat
- mp.game.system.vdist2
- mp.game.system.vdist
- mp.game.system.vmag2
- mp.game.system.vmag
- mp.game.system.wait
- mp.system.notify
- mp.system.isFullscreen
- mp.system.isFocused
- mp.system.setConnectableServers
- mp.system.connectToServer