Перейти к содержанию

TriggerEvent

Материал из RAGE MP Wiki Archive

Triggers a JavaScript serverside event.


<syntaxhighlight lang="csharp">void NAPI.LocalEvent.TriggerEvent(string eventName, params object[] args);</syntaxhighlight>

Parameters

  • eventName: A string with the name of the event name on JavaScript.
  • args: An optional array of objects with the parameters passed to the event.


Example

<syntaxhighlight>NAPI.LocalEvent.TriggerEvent("MyCustomJavaScriptEvent"); </syntaxhighlight>