addEventHandler

From GTA Connected
Revision as of 19:55, 8 May 2020 by Mex (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

addEventHandler

Signature: void addEventHandler(string eventName, function handler)

Usage: add a handler to call when an event occurs.
If the event is not an event provided by GTAC, it must be registered first by calling addEvent.

Parameters

string eventName The name of the event, case-insensitive.
function handler The scripting function to call when the event occurs.

Return

void

On failure: void