Events::callLocal

From RAGE Multiplayer Wiki
Jump to navigation Jump to search

Server-Side
Function

Js.png JavaScript



This function calls an event registered in C#.

Syntax

 mp.events.callLocal('eventName', [params...]);

Example

Server-Side
mp.events.add("heathenEvent", (player) => {
console.log("This event has been triggered.");
});

mp.events.addCommand("callheathen", (player) => { 
    mp.events.callLocal("heathenEvent", [player]);

});

See Also