Events::callLocal
Server-Side Function
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
- Functions
- Properties