AddEvent: Difference between revisions
From Onset Developer Wiki
No edit summary |
No edit summary |
||
Line 9: | Line 9: | ||
{{FuncParam|LuaFunction |The function which will be called when the event occurs.}} | {{FuncParam|LuaFunction |The function which will be called when the event occurs.}} | ||
{{FuncReturnValue| | {{FuncReturnValue|This function has no specific return value.}} | ||
== Example == | == Example == |
Revision as of 10:40, 23 March 2019
Description
Adds a function as event handler which will be called when a certain event occurs. Multiple functions can be bound to a single event.
Syntax
AddEvent(EventName, LuaFunction)
Parameters
- EventName
The name of the event. See ServerEvents or ClientEvents for a list of events. - LuaFunction
The function which will be called when the event occurs.
Return Value
- This function has no specific return value.
Example
__EDIT_ME__
See also
__EDIT_ME__