OnResourceStop

From GT-MP
Jump to: navigation, search
OnResourceStop
Shared Function
Utilities-terminal.png Server-Side System-users.png Client-Side
Csharp.png C# Javascript.png JavaScript

This type of event is mainly used for handling stuff before resource termination.

Requirements

First of all, it should be defined in your Main constructor for it to be called, otherwise it wouldn't be initiated at all!

   public Main()
   {
      API.onResourceStop += OnResourceStopHandler;
   }

Usage example(s)

   public void OnResourceStopHandler()
   { 
      API.consoleOutput("Terminating resource.."); //This would then output "[12:42:54] Terminating resource.." in server console.
   }

References