addEvent

API - subscribe to an event to receive data and a trigger of when certain situations occur

Click Events for a list of available events.

🔫Events
--note this specific event has 2 parameters
function yourFunctionName(user, string_message)
    log(user.displayName .. ' has said ' .. string_message);
end
 
return function()
    
    --attaches the event to yourFunctionName()
    addEvent('chatMessage', 'yourFunctionName'); 
    
      --make sure this script is kept alive so the event can be processed!
    keepAlive();
end
keepAliveRead Chat

Last updated