OnServerResourceEvent

From GT-MP
Jump to: navigation, search
OnServerResourceEvent
Server-Side Function
Utilities-terminal.png Server-Side Csharp.png C#

This event is triggered when triggerResourceEvent is used.

Dialog-warning.png Note: This feature is currently not in the API, or is currently not accurate on the wiki due to upcoming API changes. New API functions and changes will be released with the next update.

Syntax

In C#
Server-Side Function

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.onServerResourceEvent += API_onServerResourceEvent;
}

public void API_onServerResourceEvent(string resourceName, string eventName, params object[] arguments)
{
    // code
}

Usage example(s)

In C#
Server-Side Function

public void API_onServerResourceEvent(string resourceName, string eventName, params object[] arguments)
{
    // code
}

References