Events::delayShutdown

From RAGE Multiplayer Wiki
Jump to navigation Jump to search

Server-Side
Function

Js.png JavaScript



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