Events::delayTermination: Difference between revisions
Appearance
Created page with "{{ServersideJsFunction}} __TOC__ This function delays server's shutdown till you finish all your async tasks. ==Setter== * {{RageType|Vector3}} ==Example== {{ServersideCod..." |
|||
| Line 6: | Line 6: | ||
==Setter== | ==Setter== | ||
* {{RageType| | * {{RageType|Boolean}} | ||
==Example== | ==Example== | ||
Revision as of 10:23, 11 November 2019
Server-Side Function
This function delays server's shutdown till you finish all your async tasks.
Setter
- Boolean
Example
Server-Side
mp.events.add("serverShutdown", async () =>
{
mp.events.delayShutdown = true;
await yourAsyncFunction();
mp.events.delayShutdown = false;
});
See Also
- Functions
- Properties