AddEvent
From Onset Developer Wiki
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 Server Events or Client Events 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
AddEvent("Event Name", function()
-- code here
end)