Events::call

From RAGE Multiplayer Wiki
Jump to navigation Jump to search

This function calls registered event handlers. This function can call serverside events from serverside and clientside events from clientside.

Syntax

events.call(eventName, ...args);

Example

mp.events.add(
{
    "anyCallbackName" : anything =>
    {
         console.log(anything);
    }
});

mp.events.call("anyCallbackName", "yea");

See Also