Binds a function handler to an event.
bool Event.bind(string eventName, function handler)
bool - true if the event was successfully bound, false if something went wrong.
function myOnServerStart() Logger.info("Server started!") end Event.bind("onServerInit", myOnServerStart) -- bind a handler Event.bind("onServerInit", function() -- bind an anonymous function Logger.info("The server init event was triggered!") end)
There was an error while loading. Please reload this page.