Events::Event: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
__TOC__ | |||
{{SharedFunctionJS}} | {{SharedFunctionJS}} | ||
OOP constructor of [[Events::add|Events' add]] function | OOP constructor of [[Events::add|Events' add]] function | ||
{{JSContainer| | |||
===Syntax=== | ===Syntax=== | ||
| Line 17: | Line 19: | ||
===Example=== | ===Example=== | ||
< | <pre> | ||
let ev = new mp.Event("playerDeath", (player, reason, killer) => | let ev = new mp.Event("playerDeath", (player, reason, killer) => | ||
{ | { | ||
| Line 24: | Line 26: | ||
}); | }); | ||
ev.destroy(); // due to this line the event is never going to be executed if we call this before it | ev.destroy(); // due to this line the event is never going to be executed if we call this before it | ||
</ | </pre> | ||
}} | |||
==See Also== | |||
{{Event_functions}} | |||
Revision as of 11:37, 3 December 2019
OOP constructor of Events' add function
JavaScript Syntax
{{{1}}}
See Also
- Functions
- Properties